blob: 416337d9ca0ce385d813f864a87919c86f268220 (
plain)
1 #!/bin/sh
2 #
3 # /etc/rc.d/snmpd: start/stop net-snmpd daemon
4 #
5
6 SNMP_LOG=/var/log/snmp/snmpd.log
7 SNMP_PID=/var/run/snmp/snmpd.pid
8
9 SNMPD_ARGS="-A -p $SNMP_PID -Lf $SNMP_LOG -u daemon -g daemon"
10
11 case $1 in
12 start)
13 /usr/sbin/snmpd ${SNMPD_ARGS}
14 ;;
15 stop)
16 kill -TERM `cat $SNMP_PID`
17 ;;
18 restart)
19 $0 stop
20 sleep 2
21 $0 start
22 ;;
23 *)
24 echo "Usage: $0 [start|stop|restart]";
25 ;;
26 esac
27
28 # End of file
|