diff options
Diffstat (limited to 'user/net-snmp/snmpd.initd')
-rw-r--r-- | user/net-snmp/snmpd.initd | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/user/net-snmp/snmpd.initd b/user/net-snmp/snmpd.initd new file mode 100644 index 000000000..5d509cc3d --- /dev/null +++ b/user/net-snmp/snmpd.initd @@ -0,0 +1,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 $? +} |