blob: ea15c55380237c1c73f7a33251111d4e10100eb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/bin/sh
# $NetBSD: snmpd.sh,v 1.2 2000/12/16 09:04:41 hubertf Exp $
# PID file:
PF=/var/run/snmpd.pid
if [ -f /etc/snmp/snmpd.conf ]
then
SNMPD_CFG="-c /etc/snmp/snmpd.conf"
fi
case $1 in
start)
if [ -x @PREFIX@/sbin/snmpd ]
then
echo -n ' snmpd'
@PREFIX@/sbin/snmpd -s -P ${PF} -A -l /dev/null ${SNMPD_CFG}
fi
;;
stop)
if [ -f ${PF} ]; then
kill `cat ${PF}`
rm -f ${PF}
fi
;;
restart)
sh $0 stop
sh $0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
|