summaryrefslogtreecommitdiff
path: root/user/net-snmp/snmpd.initd
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-22 04:09:08 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-22 04:09:08 -0500
commit2fb8795e48ba6ad3943c09fa06cffea1690519e7 (patch)
tree59b4bd9bc93f46fa2d84efa916e99f1011011337 /user/net-snmp/snmpd.initd
parent2a080de5c02254e5e610ab81b2127413e8aabe7b (diff)
downloadpackages-2fb8795e48ba6ad3943c09fa06cffea1690519e7.tar.gz
packages-2fb8795e48ba6ad3943c09fa06cffea1690519e7.tar.bz2
packages-2fb8795e48ba6ad3943c09fa06cffea1690519e7.tar.xz
packages-2fb8795e48ba6ad3943c09fa06cffea1690519e7.zip
user/net-snmp: pull in, fix another wildly inaccurate license, misc
Diffstat (limited to 'user/net-snmp/snmpd.initd')
-rw-r--r--user/net-snmp/snmpd.initd24
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 $?
+}