[Groonga-commit] groonga/groonga [master] http deb: change variable name

Zurück zum Archiv-Index

HAYASHI Kentaro null+****@clear*****
Mon Sep 3 14:50:50 JST 2012


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

  New Revision: 9b6ff109368aa7782edfe0d8f2a07135a1bfad92
  https://github.com/groonga/groonga/commit/9b6ff109368aa7782edfe0d8f2a07135a1bfad92

  Log:
    http deb: change variable name
    
    OLDPIDFILE->OLD_PIDFILE

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

  Modified: packages/debian/groonga-httpd.init (+8 -8)
===================================================================
--- packages/debian/groonga-httpd.init    2012-09-03 14:22:25 +0900 (654c3a4)
+++ packages/debian/groonga-httpd.init    2012-09-03 14:50:50 +0900 (03ebee3)
@@ -24,7 +24,7 @@ GROUP=groonga
 ADDRESS=127.0.0.1
 PORT=10041
 PIDFILE=/var/run/groonga/$NAME.pid
-OLDPIDFILE=/var/run/groonga/$NAME.pid.oldbin
+OLD_PIDFILE=/var/run/groonga/$NAME.pid.oldbin
 SCRIPTNAME=/etc/init.d/$NAME
 OPTION_ARGS=""
 START_STOP_DAEMON_ARGS=""
@@ -151,16 +151,16 @@ do_restart() {
     # Starting duplicated master and worker process.
     start-stop-daemon --stop --signal USR2 --quiet --pidfile $PIDFILE --name $NAME
 
-    [ ! -f "$OLDPIDFILE" ] && sleep 5
-    if [ ! -f "$OLDPIDFILE" ]; then
+    [ ! -f "$OLD_PIDFILE" ] && sleep 5
+    if [ ! -f "$OLD_PIDFILE" ]; then
 	echo "Failed to start new groonga-httpd master."
 	return 1
     fi
 
-    OLDPID=`cat $OLDPIDFILE`
+    OLDPID=`cat $OLD_PIDFILE`
 
     # Switch worker process.
-    kill -WINCH `cat $OLDPIDFILE`
+    kill -WINCH `cat $OLD_PIDFILE`
 
     [ ! -f "$PIDFILE" ] && sleep 5
     PID=`cat $PIDFILE`
@@ -176,9 +176,9 @@ do_restart() {
     fi
 
     # Stop old master process.
-    start-stop-daemon --stop --signal QUIT --quiet --pidfile $OLDPIDFILE --name $NAME
-    [ -f "$OLDPIDFILE" ] && sleep 5
-    if [ -f "$OLDPIDFILE" ]; then
+    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."
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index