aboutsummaryrefslogtreecommitdiffstats
path: root/main/net-snmp/snmpd.initd
blob: 5d509cc3d98a0c693c7c3272f89f604cfec0699e (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
#!/sbin/openrc-run

# for backward compat
case "$SVCNAME" in
snmpd) : ${OPTS:=$SNMPD_FLAGS} ;;
esac

pidfile="/var/run/${SVCNAME}.pid"
command="/usr/sbin/${SVCNAME}"
command_args="-p ${pidfile} ${OPTS}"
required_files="/etc/snmp/${SVCNAME}.conf"
extra_started_commands="reload"

depend() {
        use logger
        need net
        after firewall
}

reload() {
        ebegin "Reloading ${SVCNAME}"
        start-stop-daemon --signal HUP --pidfile ${pidfile} --name ${SVCNAME}
        eend $?
}