SOURCES: php-fcgi.init - use functions

glen glen at pld-linux.org
Thu Dec 14 09:10:30 CET 2006


Author: glen                         Date: Thu Dec 14 08:10:30 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   php-fcgi.init (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SOURCES/php-fcgi.init
diff -u SOURCES/php-fcgi.init:1.8 SOURCES/php-fcgi.init:1.9
--- SOURCES/php-fcgi.init:1.8	Sun Sep 17 18:17:31 2006
+++ SOURCES/php-fcgi.init	Thu Dec 14 09:10:25 2006
@@ -33,10 +33,7 @@
 	PHP_FCGI_BINARY=/usr/bin/php.fcgi
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-start)
+start() {
 	# Start daemons.
 	if [ ! -f /var/lock/subsys/php-fcgi ]; then
 		export PHP_FCGI_MAX_REQUESTS
@@ -50,8 +47,9 @@
 	else
 		msg_already_running "PHP FastCGI"
 	fi
-;;
-stop)
+}
+
+stop() {
 	# Stop daemons.
 	if [ -f /var/lock/subsys/php-fcgi ]; then
 		msg_stopping "PHP FastCGI"
@@ -60,16 +58,26 @@
 	else
 		msg_not_running "PHP FastCGI"
 	fi
-;;
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+start)
+	start
+	;;
+stop)
+	stop
+	;;
 restart)
-	$0 stop
-	$0 start
+	stop
+	start
 	exit $?
-;;
+	;;
 status)
 	status php-fcgi $PHP_FCGI_BINARY
 	exit $?
-;;
+	;;
 reload|force-reload)
 	if [ -f /var/lock/subsys/php-fcgi ]; then
 		msg_reloading "PHP FastCGI"
@@ -79,7 +87,7 @@
 		msg_not_running "PHP FastCGI"
 		exit 7
 	fi
-;;
+	;;
 *)
 	msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
 	exit 3
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/php-fcgi.init?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list