SOURCES: fetchmail.init - use functions
glen
glen at pld-linux.org
Thu Oct 12 22:50:49 CEST 2006
Author: glen Date: Thu Oct 12 20:50:49 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
fetchmail.init (1.15 -> 1.16)
---- Diffs:
================================================================
Index: SOURCES/fetchmail.init
diff -u SOURCES/fetchmail.init:1.15 SOURCES/fetchmail.init:1.16
--- SOURCES/fetchmail.init:1.15 Tue May 30 13:40:40 2006
+++ SOURCES/fetchmail.init Thu Oct 12 22:50:44 2006
@@ -33,10 +33,7 @@
# Check that fetchmailrc exists.
[ -f /etc/fetchmailrc ] || exit 0
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
if [ ! -f /var/lock/subsys/fetchmail ]; then
msg_starting "fetchmail"
@@ -48,8 +45,9 @@
else
msg_already_running fetchmail
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/fetchmail ]; then
msg_stopping "fetchmail"
killproc fetchmail
@@ -57,11 +55,20 @@
else
msg_not_running "fetchmail"
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
reload|force-reload)
if [ -f /var/lock/subsys/fetchmail ]; then
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/fetchmail.init?r1=1.15&r2=1.16&f=u
More information about the pld-cvs-commit
mailing list