3 # snmpd Simple Network Management Protocol (SNMP) Daemon
7 # description: Simple Network Management Protocol (SNMP) Daemon
8 # description(es): Servidor SNMP (Simple Network Management Protocol)
9 # description(pt_BR): Servidor SNMP (Simple Network Management Protocol)
10 # description(ru): äĹÍĎÎ SNMP (Simple Network Management Protocol)
11 # description(uk): äĹÍĎÎ SNMP (Simple Network Management Protocol)
14 # config: /etc/snmp/snmpd.local.conf
15 # config: /etc/snmp/snmpd.conf
18 # Source function library
19 . /etc/rc.d/init.d/functions
22 . /etc/sysconfig/network
24 CONF_FILE=/etc/snmp/snmpd.conf
25 LOG_WARNINGS_MESSAGES_TO_SYSLOG=yes
28 [ -f /etc/sysconfig/snmpd ] && . /etc/sysconfig/snmpd
30 # Check that networking is up.
31 if is_no "${NETWORKING}"; then
32 msg_network_down "snmpd"
36 # See how we were called.
39 # Check if the service is already running?
40 if [ ! -f /var/lock/subsys/snmpd ]; then
42 daemon /usr/bin/setsid /usr/sbin/snmpd \
43 $([ -n "$CONF_FILE" ] && echo "-C -c $CONF_FILE") \
44 $( is_yes "$LOG_WARNINGS_MESSAGES_TO_SYSLOG" && \
45 echo "-s" ) </dev/null
47 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/snmpd
49 msg_already_running "snmpd"
54 if [ -f /var/lock/subsys/snmpd ]; then
57 rm -f /var/lock/subsys/snmpd >/dev/null 2>&1
59 msg_not_running "snmpd"
72 msg_usage "$0 {start|stop|status|restart|reload}"