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_yes "${NETWORKING}"; then
32 if [ ! -f /var/lock/subsys/network ]; then
33 msg_network_down "snmpd"
40 # See how we were called.
43 # Check if the service is already running?
44 if [ ! -f /var/lock/subsys/snmpd ]; then
46 daemon /usr/bin/setsid /usr/sbin/snmpd \
47 $([ -n "$CONF_FILE" ] && echo "-C -c $CONF_FILE") \
48 $( is_yes "$LOG_WARNINGS_MESSAGES_TO_SYSLOG" && \
49 echo "-s" ) </dev/null
51 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/snmpd
53 msg_already_running "snmpd"
58 if [ -f /var/lock/subsys/snmpd ]; then
61 rm -f /var/lock/subsys/snmpd >/dev/null 2>&1
63 msg_not_running "snmpd"
76 msg_usage "$0 {start|stop|restart|reload|status}"