[Groonga-commit] groonga/groonga [master] httpd deb: use --retry option for simplifying

Back to archive index

HAYASHI Kentaro null+****@clear*****
Mon Sep 3 16:03:16 JST 2012


HAYASHI Kentaro	2012-09-03 16:03:16 +0900 (Mon, 03 Sep 2012)

  New Revision: bf5f39fe6ae83fd5ee45c102818292040b5d4aa1
  https://github.com/groonga/groonga/commit/bf5f39fe6ae83fd5ee45c102818292040b5d4aa1

  Log:
    httpd deb: use --retry option for simplifying

  Modified files:
    packages/debian/groonga-httpd.init

  Modified: packages/debian/groonga-httpd.init (+2 -12)
===================================================================
--- packages/debian/groonga-httpd.init    2012-09-03 16:01:44 +0900 (31c8457)
+++ packages/debian/groonga-httpd.init    2012-09-03 16:03:16 +0900 (951d3ce)
@@ -176,16 +176,8 @@ do_restart() {
     fi
 
     # Stop old master process.
-    start-stop-daemon --stop --signal QUIT --quiet --pidfile $OLD_PIDFILE --name $NAME
-    [ -f "$OLD_PIDFILE" ] && sleep 5
-    if [ -f "$OLD_PIDFILE" ]; then
-	echo "Suceeded to switch new groonga-httpd master."
-	echo "But failed to stop old groonga-httpd master immediately."
-	echo "Wait until old worker process is finished."
-	return 3
-    fi
-
-    return 0
+    start-stop-daemon --stop --retry QUIT/$TIMEOUT --quiet --pidfile $OLD_PIDFILE --name $NAME
+    return $?
 }
 
 case "$1" in
@@ -215,8 +207,6 @@ case "$1" in
 	do_restart
 	case "$?" in
 	    0) log_end_msg 0 ;;
-	    1|2) log_end_msg 1 ;;
-	    3) log_end_msg 255 ;;
 	    *) log_end_msg 1 ;;
 	esac
 	;;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index