diff --git a/iup/files/etc/init.d/iup b/iup/files/etc/init.d/iup index 1724bf9cf..f6f0fb27c 100755 --- a/iup/files/etc/init.d/iup +++ b/iup/files/etc/init.d/iup @@ -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() { diff --git a/iup/files/sbin/iup b/iup/files/sbin/iup index 7d61b80aa..bd2094804 100755 --- a/iup/files/sbin/iup +++ b/iup/files/sbin/iup @@ -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