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 # See how we were called.
40 # Check if the service is already running?
41 if [ ! -f /var/lock/subsys/snmptrapd ]; then
42 msg_starting "snmptrapd"
43 daemon /usr/sbin/snmptrapd $SNMPTRAPD_OPTIONS
45 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/snmptrapd
47 msg_already_running "snmptrapd"
51 if [ -f /var/lock/subsys/snmptrapd ]; then
52 msg_stopping "snmptrapd"
54 rm -f /var/lock/subsys/snmptrapd >/dev/null 2>&1
56 msg_not_running "snmptrapd"
69 msg_usage "$0 {start|stop|restart|force-reload|status}"