3 # ucd-snmptrapd Simple Network Management Protocol (SNMP) Trap Daemon
7 # description: Simple Network Management Protocol (SNMP) Trap Daemon
9 # processname: snmptrapd
10 # config: /etc/snmp/snmptrapd.local.conf
11 # config: /etc/snmp/snmptrapd.conf
14 # Source function library
15 . /etc/rc.d/init.d/functions
18 . /etc/sysconfig/network
20 # Define initial value:
24 [ -f /etc/sysconfig/snmpd ] && . /etc/sysconfig/snmptrapd
26 # Check that networking is up.
27 if is_yes "${NETWORKING}"; then
28 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
29 msg_network_down "snmptrapd"
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/snmptrapd ]; then
39 msg_starting "snmptrapd"
40 daemon /usr/sbin/snmptrapd $SNMPTRAPD_OPTIONS
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/snmptrapd
44 msg_already_running "snmptrapd"
49 if [ -f /var/lock/subsys/snmptrapd ]; then
50 msg_stopping "snmptrapd"
52 rm -f /var/lock/subsys/snmptrapd >/dev/null 2>&1
54 msg_not_running "snmptrapd"
59 if [ -f /var/lock/subsys/snmptrapd ]; then
63 msg_not_running "snmptrapd"
69 # See how we were called.
92 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"