From cae28083183a2647d3bb4583d48eab042059e036 Mon Sep 17 00:00:00 2001 From: Strhuan Blomquist Date: Tue, 12 Jan 2016 16:25:51 +0100 Subject: [PATCH] Fixes So that we dont get double iup process refs #8437 --- iup/files/etc/init.d/iup | 9 ++++++++- iup/files/sbin/iup | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) 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