SOURCES: PyICQt.init - use functions

glen glen at pld-linux.org
Sun Aug 19 14:52:57 CEST 2007


Author: glen                         Date: Sun Aug 19 12:52:57 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   PyICQt.init (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/PyICQt.init
diff -u SOURCES/PyICQt.init:1.3 SOURCES/PyICQt.init:1.4
--- SOURCES/PyICQt.init:1.3	Sun Aug 19 13:39:12 2007
+++ SOURCES/PyICQt.init	Sun Aug 19 14:52:51 2007
@@ -20,10 +20,7 @@
 	exit 0
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
 	# Check if the service is already running?
 	if [ ! -f /var/lock/subsys/PyICQt ]; then
 		msg_starting "Jabber ICQ transport"
@@ -33,8 +30,9 @@
 	else
 		msg_already_running PyICQt
 	fi
-	;;
-  stop)
+}
+
+stop() {
 	# Check if the service is already running?
 	if [ -f /var/lock/subsys/PyICQt ]; then
 		msg_stopping  "Jabber ICQ transport"
@@ -43,10 +41,20 @@
 	else
 		msg_not_running PyICQt
 	fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
 	;;
   restart|force-reload)
-	$0 stop
-	$0 start
+	stop
+	start
 	exit $?
 	;;
   status)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/PyICQt.init?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list