]>
Commit | Line | Data |
---|---|---|
5c9dd661 PP |
1 | #!/bin/sh |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/net-snmp | |
4 | # | |
5 | # Description : This is a script that starts net-snmp as deamon | |
6 | # | |
7 | # Authors : Peter Pfeiffer (peterman@ipfire.org) | |
8 | # | |
9 | # Version : 01.00 | |
10 | # | |
11 | # Notes : | |
12 | # | |
13 | ######################################################################## | |
14 | ||
15 | . /etc/sysconfig/rc | |
16 | . ${rc_functions} | |
17 | ||
18 | case "${1}" in | |
19 | start) | |
20 | boot_mesg "Starting net-snmp - SNMPD..." | |
21 | loadproc /usr/sbin/snmpd -c /etc/snmpd.conf > /dev/null | |
22 | evaluate_retval | |
23 | ;; | |
24 | ||
25 | stop) | |
26 | boot_mesg "Stopping net-snmp - SNMPD..." | |
27 | killproc /usr/sbin/snmpd | |
28 | ;; | |
29 | ||
30 | restart) | |
31 | ${0} stop | |
32 | sleep 1 | |
33 | ${0} start | |
34 | ;; | |
35 | ||
36 | status) | |
37 | statusproc /usr/sbin/snmpd | |
38 | ;; | |
39 | ||
40 | *) | |
41 | echo "Usage: ${0} {start|stop|restart|status}" | |
42 | exit 1 | |
43 | ;; | |
44 | esac | |
45 | ||
46 | # End $rc_base/init.d/net-snmp |