blob: 4aae15d05e99a92094d9ea4d03097f92b7b92126 (
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
36
37
|
#!/bin/sh
# $NetBSD: snmpd.sh,v 1.3 2001/01/26 02:02:35 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 ${SNMPD_CFG}
fi
;;
stop)
if [ -f ${PF} ]; then
kill `cat ${PF}`
rm -f ${PF}
else
echo "$0: snmpd not running or PID not recorded!" 1>&2
fi
;;
restart)
sh $0 stop
sh $0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
|