[packages/nginx] init: use pidfiles

glen glen at pld-linux.org
Sun May 3 22:23:51 CEST 2015


commit 6584060988eadbd2363587620313c0bf9264586b
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun May 3 23:23:09 2015 +0300

    init: use pidfiles
    
    so that only main process is handled, not sending to processes just by
    same name

 nginx.init | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/nginx.init b/nginx.init
index 4d618f0..ad6d1dc 100755
--- a/nginx.init
+++ b/nginx.init
@@ -91,7 +91,8 @@ stop() {
 	# Stop daemons.
 	if [ -f $lockfile ]; then
 		msg_stopping "$svname"
-		killproc $prog
+		killproc -p $pidfile $prog
+		RETVAL=$?
 		rm -f $lockfile $pidfile >/dev/null 2>&1
 	else
 		msg_not_running "$svname"
@@ -102,7 +103,7 @@ reload() {
 	if [ -f $lockfile ]; then
 		checkconfig
 		msg_reloading "$svname"
-		killproc $prog -HUP
+		killproc -p $pidfile $prog -HUP
 		RETVAL=$?
 	else
 		msg_not_running "$svname"
@@ -146,7 +147,7 @@ case "$1" in
 	checkconfig 1
 	;;
   status)
-	status $prog
+	status --pidfile $pidfile $prog
 	RETVAL=$?
 	;;
   *)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nginx.git/commitdiff/6584060988eadbd2363587620313c0bf9264586b



More information about the pld-cvs-commit mailing list