1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 02:05:16 +03:00
aports/community/zigbee2mqtt/zigbee2mqtt.initd
2022-11-20 01:36:54 +01:00

22 lines
558 B
Bash

#!/sbin/openrc-run
name="Zigbee2MQTT"
: ${command_user:="zigbee2mqtt"}
: ${start_wait=100} # milliseconds
command="/usr/bin/zigbee2mqtt"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
start_stop_daemon_args="--wait $start_wait $start_stop_daemon_args"
# The leading space is to avoid fallback to $start_stop_daemon_args when this
# is empty (supervise-daemon doesn't support --wait).
supervise_daemon_args=" $supervise_daemon_args"
export ZIGBEE2MQTT_DATA="${datadir:="/var/lib/zigbee2mqtt"}"
depend() {
need dev localmount
use mosquitto
}