[Groonga-commit] groonga/groonga at 8bb88ea [master] groonga-httpd-reastart: use "$(...)" for executing external command

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Aug 22 16:11:30 JST 2013


Kouhei Sutou	2013-08-22 16:11:30 +0900 (Thu, 22 Aug 2013)

  New Revision: 8bb88ea2e945fcae421368815ba44b3d76f74cc5
  https://github.com/groonga/groonga/commit/8bb88ea2e945fcae421368815ba44b3d76f74cc5

  Message:
    groonga-httpd-reastart: use "$(...)" for executing external command

  Modified files:
    data/scripts/groonga-httpd-restart

  Modified: data/scripts/groonga-httpd-restart (+4 -4)
===================================================================
--- data/scripts/groonga-httpd-restart    2013-08-22 16:10:30 +0900 (e8e24db)
+++ data/scripts/groonga-httpd-restart    2013-08-22 16:11:30 +0900 (445cb6c)
@@ -62,7 +62,7 @@ if ! wait_until [ -f ${OLD_PID_FILE} ]; then
     exit 1
 fi
 
-OLD_PID=`cat ${OLD_PID_FILE}`
+OLD_PID=$(cat ${OLD_PID_FILE})
 
 # Switch worker process.
 kill -WINCH ${OLD_PID}
@@ -71,13 +71,13 @@ if ! wait_until [ -f "${PID_FILE}" ]; then
     echo "Failed to switch worker process."
     exit 2
 fi
-PID=`cat ${PID_FILE}`
+PID=$(cat ${PID_FILE})
 
-OLD_WORKER_PROCESS=`pgrep -P ${OLD_PID} | grep -v ${PID}`
+OLD_WORKER_PROCESS=$(pgrep -P ${OLD_PID} | grep -v ${PID})
 for pid in ${OLD_WORKER_PROCESS}; do
     wait_until ps --pid=${pid} > /dev/null
 done
-OLD_WORKER_PROCESS=`pgrep -P ${OLD_PID} | grep -v ${PID}`
+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."
     killproc -p ${PID_FILE} ${GROONGA_HTTPD} -QUIT
-------------- next part --------------
HTML����������������������������...
Download 



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