0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-12 03:28:07 +00:00
PeterFromSweden dfb030d412 telldus-mqtt: add new package in utils
Extends functionality of exisiting telldus-core package

Signed-off-by: PeterFromSweden <peterfromswe884@gmail.com>
2024-02-04 16:14:01 -08:00

21 lines
609 B
Bash

#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
PROG=/usr/bin/telldus-mqtt
CONFFILE=/etc/telldus-mqtt/telldus-mqtt.json
CONFFILE_HOMEASSISTANT=/etc/telldus-mqtt/telldus-mqtt-homeassistant.json
start_service() {
procd_open_instance
procd_set_param command $PROG
procd_append_param command --nodaemon # foreground required by procd
procd_set_param file $CONFFILE
procd_append_param file $CONFFILE_HOMEASSISTANT
procd_set_param respawn # respawn the service if it exits
procd_set_param stdout 1 # forward stdout of the command to logd
procd_set_param stderr 1 # same for stderr
procd_close_instance
}