summaryrefslogtreecommitdiff
path: root/main/net-snmp/snmptrapd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/net-snmp/snmptrapd.initd')
-rw-r--r--main/net-snmp/snmptrapd.initd22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/net-snmp/snmptrapd.initd b/main/net-snmp/snmptrapd.initd
new file mode 100644
index 00000000000..bf56233ab6a
--- /dev/null
+++ b/main/net-snmp/snmptrapd.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+
+NAME=snmptrapd
+DAEMON=/usr/sbin/$NAME
+
+depend() {
+ use logger
+ need net
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet --background \
+ --exec ${DAEMON} -- -p /var/run/${NAME}.pid ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet --pidfile /var/run/${NAME}.pid
+ eend $?
+}