[Groonga-commit] groonga/groonga at de70199 [master] redhat groonga-httpd: use "if" instead of "&& .. && .. &&"

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jul 3 18:44:09 JST 2015


Kouhei Sutou	2015-07-03 18:44:09 +0900 (Fri, 03 Jul 2015)

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

  Message:
    redhat groonga-httpd: use "if" instead of "&& .. && .. &&"

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

  Modified: data/init.d/redhat/groonga-httpd (+8 -4)
===================================================================
--- data/init.d/redhat/groonga-httpd    2015-07-03 18:38:47 +0900 (189b3cb)
+++ data/init.d/redhat/groonga-httpd    2015-07-03 18:44:09 +0900 (17af9ec)
@@ -36,11 +36,15 @@ RETVAL=0
 
 start() {
 	echo -n $"Starting $prog: "
-	[ -f /var/lock/subsys/$prog ] && passed && echo && exit 0
-	daemon $DAEMON_ARGS ${GROONGA_HTTPD} ${GROONGA_HTTPD_ARGS}
-	RETVAL=$?
+	if [ -f /var/lock/subsys/$prog ]; then
+		passed
+		RETVAL=0
+	else
+		daemon $DAEMON_ARGS ${GROONGA_HTTPD} ${GROONGA_HTTPD_ARGS}
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+	fi
 	echo
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
 	return $RETVAL
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



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