secubox-openwrt/package/secubox/secubox-app-zigbee2mqtt/files/etc/init.d/zigbee2mqtt

24 lines
362 B
Plaintext
Raw Normal View History

#!/bin/sh /etc/rc.common
START=95
STOP=10
USE_PROCD=1
SERVICE_BIN="/usr/sbin/zigbee2mqttctl"
start_service() {
procd_open_instance
procd_set_param command "$SERVICE_BIN" service-run
procd_set_param respawn 2000 5 5
procd_close_instance
}
stop_service() {
"$SERVICE_BIN" service-stop >/dev/null 2>&1
}
restart_service() {
stop_service
start_service
}