[Groonga-commit] groonga/groonga [master] rpm: add timeout setting

Back to archive index

HAYASHI Kentaro null+****@clear*****
Wed Dec 26 12:18:27 JST 2012


HAYASHI Kentaro	2012-12-26 12:18:27 +0900 (Wed, 26 Dec 2012)

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

  Log:
    rpm: add timeout setting
    
    refs #1456

  Modified files:
    data/init.d/redhat/sysconfig/groonga-httpd
    data/scripts/groonga-httpd-restart

  Modified: data/init.d/redhat/sysconfig/groonga-httpd (+1 -0)
===================================================================
--- data/init.d/redhat/sysconfig/groonga-httpd    2012-12-26 10:18:02 +0900 (82dca6d)
+++ data/init.d/redhat/sysconfig/groonga-httpd    2012-12-26 12:18:27 +0900 (696e5c8)
@@ -7,3 +7,4 @@
 #LOG_PATH=/var/log/groonga/httpd/access.log
 #QUERY_LOG_PATH=/var/log/groonga/httpd/access.log
 #GRN_QUERY_EXPANDER_TSV_SYNONYMS_FILE=/usr/share/groonga/synonyms.tsv
+STATUS_TIMEOUT=3

  Modified: data/scripts/groonga-httpd-restart (+9 -3)
===================================================================
--- data/scripts/groonga-httpd-restart    2012-12-26 10:18:02 +0900 (3524006)
+++ data/scripts/groonga-httpd-restart    2012-12-26 12:18:27 +0900 (18421e3)
@@ -3,21 +3,27 @@
 GROONGA_HTTPD=groonga-httpd
 PIDFILE=/var/run/groonga/${GROONGA_HTTPD}.pid
 OLD_PIDFILE=$PIDFILE.oldbin
-TIMEOUT=3
+STATUS_TIMEOUT=3
 
 # Source function library.
 if [ -f /lib/lsb/init-functions ]; then
     . /lib/lsb/init-functions
+    if [ -f /etc/default/$GROONGA_HTTPD ]; then
+	. /etc/default/$GROONGA_HTTPD
+    fi
 elif [ -f /etc/init.d/functions ]; then
     . /etc/init.d/functions
+    if [ -f /etc/sysconfig/$GROONGA_HTTPD ]; then
+	. /etc/sysconfig/$GROONGA_HTTPD
+    fi
 fi
 
 wait_until_file_is_created () {
-	timeout $TIMEOUT tail -F $1 --quiet 2> /dev/null | read 2> /dev/null
+	timeout $STATUS_TIMEOUT tail -F $1 --quiet 2> /dev/null | read 2> /dev/null
 }
 
 wait_until_process_is_finished () {
-	timeout $TIMEOUT tail -F /dev/null --pid=$1
+	timeout $STATUS_TIMEOUT tail -F /dev/null --pid=$1
 }
 
 if [ "$1" = "try-restart" ]; then
-------------- next part --------------
HTML����������������������������...
Download 



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