You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
485 B
Bash
33 lines
485 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (c) 2011-2015 OpenWrt.org
|
|
|
|
START=99
|
|
|
|
start() {
|
|
if [ ! -f "/var/run/cellled.pid" ]; then
|
|
/usr/bin/cellled >/dev/null 2>&1 &
|
|
PID=$(pgrep -f /usr/bin/cellled)
|
|
if [ $PID ]; then
|
|
echo $PID > /var/run/cellled.pid
|
|
fi
|
|
fi
|
|
return 0
|
|
}
|
|
|
|
stop() {
|
|
rm -f /var/run/cellled.pid
|
|
kill $(pgrep -f /usr/bin/cellled) >/dev/null 2>&1
|
|
/etc/init.d/led start
|
|
}
|
|
|
|
restart(){
|
|
stop
|
|
sleep 1
|
|
start
|
|
}
|
|
|
|
boot() {
|
|
(sleep 5 && start >/dev/null 2>&1) &
|
|
return 0
|
|
}
|