33 lines
916 B
Bash
33 lines
916 B
Bash
#!/bin/sh
|
|
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
|
|
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
|
|
set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
|
|
fi
|
|
### BEGIN INIT INFO
|
|
# Provides: snmptrapd
|
|
# Required-Start: $network $remote_fs $syslog
|
|
# Required-Stop: $network $remote_fs $syslog
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: SNMP trap agent
|
|
# Description: NET SNMP (Simple Network Management Protocol) Trap Agent
|
|
### END INIT INFO
|
|
|
|
DESC="SNMP Trap Services"
|
|
DAEMON=/usr/sbin/snmptrapd
|
|
PIDFILE="/run/snmptrapd.pid"
|
|
|
|
DEFAULT_TRAPDOPTS="-LSwd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf"
|
|
|
|
do_start_prepare()
|
|
{
|
|
[ -z "$TRAPDOPTS" ] && TRAPDOPTS=$DEFAULT_TRAPDOPTS
|
|
DAEMON_ARGS=" $TRAPDOPTS -p $PIDFILE"
|
|
}
|
|
|
|
do_restart_prepare()
|
|
{
|
|
do_start_prepare
|
|
}
|
|
|