procdify inteno init scripts

This commit is contained in:
Sukru Senli 2015-05-27 23:59:59 +02:00 committed by Martin Schröder
parent e023512d0a
commit 0bb532ed2f
2 changed files with 27 additions and 13 deletions

View file

@ -1,11 +1,18 @@
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2009 OpenWrt.org
#
START=15
start() {
/sbin/bcmhotproxy
USE_PROCD=1
NAME=bcmhotproxy
PROG=/sbin/bcmhotproxy
start_service() {
procd_open_instance
procd_set_param command "$PROG"
procd_close_instance
}
stop() {
service_stop /sbin/bcmhotproxy
}

View file

@ -1,16 +1,23 @@
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2009 OpenWrt.org
#
START=19
start() {
/sbin/peripheral_manager
sleep 1
/bin/ubus call led.status set '{"state":"ok"}' &
USE_PROCD=1
NAME=peripheral_manager
PROG=/sbin/peripheral_manager
start_service() {
procd_open_instance
procd_set_param command "$PROG"
procd_close_instance
}
service_running() {
ubus -t 2 wait_for leds
ubus call led.status set '{"state":"ok"}'
}
stop() {
killall -9 peripheral_manager
service_stop /sbin/peripheral_manager
}