SOURCES: inn.init - use functions, daemon with --user, better status
blues
blues at pld-linux.org
Thu Aug 14 14:19:26 CEST 2008
Author: blues Date: Thu Aug 14 12:19:26 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions, daemon with --user, better status
---- Files affected:
SOURCES:
inn.init (1.25 -> 1.26)
---- Diffs:
================================================================
Index: SOURCES/inn.init
diff -u SOURCES/inn.init:1.25 SOURCES/inn.init:1.26
--- SOURCES/inn.init:1.25 Thu Dec 8 02:02:49 2005
+++ SOURCES/inn.init Thu Aug 14 14:19:20 2008
@@ -26,11 +26,7 @@
else
exit 0
fi
-
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
if [ ! -f /var/lock/subsys/inn ]; then
grep -v "#" /etc/news/inn.conf | grep ovmethod | grep ovdb 2>&1 >/dev/null
RETVAL=$?
@@ -41,7 +37,7 @@
fi
msg_starting "INN"
- daemon su news -c inndstart
+ daemon --user=news inndstart
if is_yes "$DOINNWATCH" ; then
msg_starting "INN Watch"
busy
@@ -63,8 +59,9 @@
else
msg_already_running "INN"
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/inn ]; then
msg_stopping "INN"
busy
@@ -108,10 +105,20 @@
else
msg_not_running INN
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
status)
status innd
- exit $?
+ innstat
;;
reload|force-reload)
if [ -f /var/lock/subsys/inn ]; then
@@ -126,9 +133,9 @@
fi
;;
restart)
- $0 stop
+ stop
sleep 2
- $0 start
+ start
;;
*)
msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/inn.init?r1=1.25&r2=1.26&f=u
More information about the pld-cvs-commit
mailing list