summaryrefslogtreecommitdiff
path: root/net/ucd-snmp
diff options
context:
space:
mode:
authorhubertf <hubertf>2001-01-28 03:39:48 +0000
committerhubertf <hubertf>2001-01-28 03:39:48 +0000
commita53fd74369d1e557004bc6f6a132eabf7e5d5aaa (patch)
treef33edb1ad7f3e7fcc7bf99b2ff6bd90b2ccd5ba5 /net/ucd-snmp
parent532c88c6a6b654749de5dd9dbb29e02701e6a510 (diff)
downloadpkgsrc-a53fd74369d1e557004bc6f6a132eabf7e5d5aaa.tar.gz
This was meant to be added for PR 12043 - fixes part of PR 12055
Diffstat (limited to 'net/ucd-snmp')
-rw-r--r--net/ucd-snmp/files/snmptrapd.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/net/ucd-snmp/files/snmptrapd.sh b/net/ucd-snmp/files/snmptrapd.sh
new file mode 100644
index 00000000000..f0706d0a5a1
--- /dev/null
+++ b/net/ucd-snmp/files/snmptrapd.sh
@@ -0,0 +1,32 @@
+#! /bin/sh
+#
+# $NetBSD: snmptrapd.sh,v 1.1 2001/01/28 03:39:48 hubertf Exp $
+
+# PID file:
+PF=/var/run/snmptrapd.pid
+
+
+case $1 in
+start)
+ if [ -x @PREFIX@/sbin/snmptrapd ]
+ then
+ echo -n ' snmptrapd'
+ @PREFIX@/sbin/snmptrapd -s -l 1 -u ${PF}
+ fi
+ ;;
+stop)
+ if [ -f ${PF} ]; then
+ kill `cat ${PF}`
+ rm -f ${PF}
+ else
+ echo "$0: snmptrapd not running or PID not recorded!" 1>&2
+ fi
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac