Fixes So that we dont get double iup process refs #8437

This commit is contained in:
Strhuan Blomquist 2016-01-12 16:25:51 +01:00
parent 6f600d6f37
commit cae2808318
2 changed files with 10 additions and 2 deletions

View file

@ -49,6 +49,10 @@ init_iup() {
fi
}
boot() {
init_iup
}
start_service() {
init_iup
@ -59,7 +63,10 @@ start_service() {
}
stop_service() {
killall -9 /sbin/iup
if [ -f "/tmp/run/iup.pid" ]; then
kill -9 $(cat /tmp/run/iup.pid)
rm -rf /tmp/run/iup.pid
fi
}
reload_service() {

View file

@ -1,5 +1,5 @@
#!/bin/sh
echo $$ > /var/run/iup.pid
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
@ -294,3 +294,4 @@ if [ "$reboot" == "on" ]; then
v "Reboot Signaled"
/sbin/reboot
fi
rm -rf /var/run/iup.pid