Changed files:
net-snmpd.init -> 1.14
net-snmptrapd.init -> 1.9
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/snmpd ]; then
msg_starting "snmpd"
else
msg_already_running "snmpd"
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/snmpd ]; then
msg_stopping "snmpd"
killproc snmpd
else
msg_not_running "snmpd"
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
reload)
if [ -f /var/lock/subsys/snmpd ]; then
fi
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
status)
status snmpd
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/snmptrapd ]; then
msg_starting "snmptrapd"
else
msg_already_running "snmptrapd"
fi
- ;;
- stop)
+}
+
+stop() {
if [ -f /var/lock/subsys/snmptrapd ]; then
msg_stopping "snmptrapd"
killproc snmptrapd
else
msg_not_running "snmptrapd"
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 snmptrapd