iopsys-feed/peripheral_manager/files/etc/init.d/peripheral_manager
Kenneth Johansson b2dcd3a853 perf_manager: turn off all leds when turning off.
we need this so that when we do a reset the leds is known to be off.
2017-03-23 10:06:34 +01:00

27 lines
470 B
Bash
Executable file

#!/bin/sh /etc/rc.common
START=19
STOP=91
USE_PROCD=1
NAME=peripheral_manager
PROG=/sbin/peripheral_manager
start_service() {
procd_open_instance
procd_set_param command "$PROG" -f
procd_set_param respawn
procd_close_instance
}
service_running() {
ubus -t 2 wait_for led.status
ubus call led.status set '{"state":"notice"}'
ubus -t 2 wait_for button
}
stop_service() {
ubus call leds set '{"state":"alloff"}'
service_stop /sbin/peripheral_manager
}