From: parmentelat <thierry.parmentelat@inria.fr>
Date: Fri, 14 Dec 2018 12:13:12 +0000 (+0100)
Subject: killproc no longer available in image
X-Git-Tag: myplc-7.0-0~2
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4ec856430b9b9a8f16ea2a5d0b11e951cfb1ed1c;p=myplc.git

killproc no longer available in image
---

diff --git a/plc.d/dns b/plc.d/dns
index afdf55f..b72b5a3 100755
--- a/plc.d/dns
+++ b/plc.d/dns
@@ -39,7 +39,7 @@ case "$1" in
 		[ -n "$PLC_NET_DNS1" ] && echo "nameserver $PLC_NET_DNS1"
 		[ -n "$PLC_NET_DNS2" -a "$PLC_NET_DNS1" != "$PLC_NET_DNS2" ] && echo "nameserver $PLC_NET_DNS2"
 	    ) > $rfile
-	    
+
 	    if [ $PLC_DNS_ENABLED -eq 1 ] ; then
 		ourfile=$(grep "$SIGNATURE" /etc/resolv.conf| wc -l)
 		if [ $ourfile -eq 0 ] ; then
@@ -66,8 +66,8 @@ case "$1" in
 	    dialog "$MESSAGE"
 	    if [ -f "/etc/plc_resolv.conf" ] ; then
 		ourfile=$(grep "$SIGNATURE" /etc/plc_resolv.conf| wc -l)
-		if [ $ourfile -ne 0 ] ; then 
-		    dialog "WARNING: original /etc/resolv.conf was generated by etc/plc.d/dns"		
+		if [ $ourfile -ne 0 ] ; then
+		    dialog "WARNING: original /etc/resolv.conf was generated by etc/plc.d/dns"
 		fi
 		mv -f /etc/plc_resolv.conf /etc/resolv.conf
 	    fi
@@ -88,7 +88,7 @@ case "$1" in
 	if [ $PLC_DNS_ENABLED -eq 1 ] ; then
 	    MESSAGE="Stopping DNS server"
 	    dialog "$MESSAGE"
-	    killproc plc_dnsmasq
+	    pkill -f plc_dnsmasq
 	    check
 	    result ""
 	fi
diff --git a/plc.d/httpd b/plc.d/httpd
index 526e37c..ce5e42e 100755
--- a/plc.d/httpd
+++ b/plc.d/httpd
@@ -326,7 +326,7 @@ EOF
 	MESSAGE=$"Stopping web server"
 	dialog "$MESSAGE"
 
-	killproc plc_httpd
+	pkill -f plc_httpd
 	check
 
 	result "$MESSAGE"