SOURCES: nessusd.init - use functions
glen
glen at pld-linux.org
Mon Mar 5 01:08:08 CET 2007
Author: glen Date: Mon Mar 5 00:08:08 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions
---- Files affected:
SOURCES:
nessusd.init (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SOURCES/nessusd.init
diff -u SOURCES/nessusd.init:1.4 SOURCES/nessusd.init:1.5
--- SOURCES/nessusd.init:1.4 Fri Sep 26 14:58:04 2003
+++ SOURCES/nessusd.init Mon Mar 5 01:08:03 2007
@@ -18,10 +18,7 @@
. /etc/sysconfig/nessusd
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/nessusd ]; then
msg_starting "Nessus Daemon"
@@ -31,8 +28,9 @@
else
msg_already_running "Nessus Daemon"
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/nessusd ]; then
msg_stopping "Nessus Daemon"
killproc nessusd
@@ -40,15 +38,24 @@
else
msg_not_running "Nessus Daemon"
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
status)
status nessusd
exit $?
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
*)
msg_usage "$0 {start|stop|restart|force-reload|status}"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/nessusd.init?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list