SOURCES: PyMSNt.init - use functions
glen
glen at pld-linux.org
Sun Aug 19 14:52:13 CEST 2007
Author: glen Date: Sun Aug 19 12:52:13 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
PyMSNt.init (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SOURCES/PyMSNt.init
diff -u SOURCES/PyMSNt.init:1.4 SOURCES/PyMSNt.init:1.5
--- SOURCES/PyMSNt.init:1.4 Sun Aug 19 02:30:08 2007
+++ SOURCES/PyMSNt.init Sun Aug 19 14:52:08 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/PyMSNt ]; then
msg_starting "Jabber MSN transport"
@@ -33,8 +30,9 @@
else
msg_already_running PyMSNt
fi
- ;;
- stop)
+}
+
+stop() {
# Check if the service is already running?
if [ -f /var/lock/subsys/PyMSNt ]; then
msg_stopping "Jabber MSN transport"
@@ -43,11 +41,20 @@
else
msg_not_running PyMSNt
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
status)
status PyMSNt.py
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/PyMSNt.init?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list