HAYASHI Kentaro
null+****@clear*****
Thu Sep 6 17:35:01 JST 2012
HAYASHI Kentaro 2012-09-06 17:35:01 +0900 (Thu, 06 Sep 2012) New Revision: 4b3f1c1044a9a7809178eae1959b62d9fb103cdb https://github.com/groonga/groonga/commit/4b3f1c1044a9a7809178eae1959b62d9fb103cdb Log: deb rpm: remove unused function for restarting groonga-httpd NOTE: Maintain helper script (data/scripts/groonga-httpd-restart) instead. The helper script will be installed under /usr/sbin/. It is used from /etc/init.d/groonga-httpd. Modified files: data/init.d/redhat/groonga-httpd packages/debian/groonga-httpd.init Modified: data/init.d/redhat/groonga-httpd (+0 -32) =================================================================== --- data/init.d/redhat/groonga-httpd 2012-09-06 17:29:04 +0900 (96610f0) +++ data/init.d/redhat/groonga-httpd 2012-09-06 17:35:01 +0900 (d5a6139) @@ -108,38 +108,6 @@ stop() { return $RETVAL } -restart() { - killproc -p $PIDFILE ${GROONGA_HTTPD} -USR2 - - [ ! -f "$OLD_PIDFILE" ] && sleep $TIMEOUT - if [ ! -f "$OLD_PIDFILE" ]; then - echo "Failed to start new groonga-httpd master." - return 1 - fi - - OLDPID=`cat $OLD_PIDFILE` - - # Switch worker process. - kill -WINCH `cat $OLD_PIDFILE` - - [ ! -f "$PIDFILE" ] && sleep $TIMEOUT - PID=`cat $PIDFILE` - - OLD_WORKER_PROCESS=`pgrep -P $OLDPID | grep -v $PID` - [ -n "$OLD_WORKER_PROCESS" ] && sleep $TIMEOUT - OLD_WORKER_PROCESS=`pgrep -P $OLDPID | grep -v $PID` - if [ -n "$OLD_WORKER_PROCESS" ]; then - echo "Failed to stop old groonga-httpd worker process." - killproc -p $PIDFILE ${GROONGA_HTTPD} -QUIT - echo "Rollback to old groonga-httpd master." - return 2 - fi - - # Stop old master process. - killproc -p $OLD_PIDFILE ${GROONGA_HTTPD} -QUIT - return $? -} - status() { send_command status } Modified: packages/debian/groonga-httpd.init (+0 -45) =================================================================== --- packages/debian/groonga-httpd.init 2012-09-06 17:29:04 +0900 (df51b53) +++ packages/debian/groonga-httpd.init 2012-09-06 17:35:01 +0900 (cd45f18) @@ -142,51 +142,6 @@ do_status() { return $? } -do_restart() { - - # Return - # 0 if daemon has restarted. - # 1 if daemon has failed to start new master process. - # 2 if daemon has failed to switch worker process. - # 3 if daemon has failed to stop old worker process. (Rollback) - - # Starting duplicated master and worker process. - start-stop-daemon --stop --signal USR2 --quiet --pidfile $PIDFILE --name $NAME - - inotifywait --quiet --event create --timeout 1 $OLD_PIDFILE - if [ ! -f "$OLD_PIDFILE" ]; then - echo "Failed to start new groonga-httpd master." - return 1 - fi - - OLD_PID=`cat $OLD_PIDFILE` - - # Switch worker process. - kill -WINCH `cat $OLD_PIDFILE` - - inotifywait --quiet --event create --timeout 1 $PIDFILE - if [ ! -f "$PIDFILE" ]; then - echo "Failed to switch worker process." - return 2 - fi - - PID=`cat $PIDFILE` - - OLD_WORKER_PROCESS=`pgrep -P $OLD_PID | grep -v $PID` - [ -n "$OLD_WORKER_PROCESS" ] && sleep $TIMEOUT - OLD_WORKER_PROCESS=`pgrep -P $OLD_PID | grep -v $PID` - if [ -n "$OLD_WORKER_PROCESS" ]; then - echo "Failed to stop old groonga-httpd worker process." - start-stop-daemon --stop --signal QUIT --quiet --pidfile $PIDFILE --name $NAME - echo "Rollback to old groonga-httpd master." - return 3 - fi - - # Stop old master process. - start-stop-daemon --stop --retry QUIT/$TIMEOUT --quiet --pidfile $OLD_PIDFILE --name $NAME - return $? -} - case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" -------------- next part -------------- HTML����������������������������... 다운로드