SOURCES: smokeping.init - use functions
blues
blues at pld-linux.org
Thu Oct 25 21:25:47 CEST 2007
Author: blues Date: Thu Oct 25 19:25:47 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
smokeping.init (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/smokeping.init
diff -u SOURCES/smokeping.init:1.2 SOURCES/smokeping.init:1.3
--- SOURCES/smokeping.init:1.2 Sat Oct 16 11:45:17 2004
+++ SOURCES/smokeping.init Thu Oct 25 21:25:41 2007
@@ -22,9 +22,7 @@
exit 0
fi
-RETVAL=0
-case "$1" in
- start)
+start() {
if [ ! -f /var/lock/subsys/smokeping ]; then
msg_starting smokeping
daemon smokeping
@@ -33,8 +31,9 @@
else
msg_already_running smokeping
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/smokeping ]; then
msg_stopping smokeping
killproc smokeping
@@ -42,10 +41,19 @@
else
msg_not_running smokeping
fi
+}
+
+RETVAL=0
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart|reload)
- $0 stop
- $0 start
+ stop
+ start
exit $?
;;
status)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/smokeping.init?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list