File: snmptrapd.init

package info (click to toggle)
net-snmp 5.9+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 36,760 kB
  • sloc: ansic: 283,039; perl: 17,712; sh: 11,887; makefile: 2,705; xml: 663; python: 623; pascal: 62; sql: 47
file content (32 lines) | stat: -rw-r--r-- 916 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/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
}