mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 18:26:44 +02:00
- Legacy SNMPD_FLAGS variable was removed 6 years ago - Don't use /var/run anymore - Run snmpd in foreground, so user has the option to run it under supervise-daemon (not used by default)
22 lines
474 B
Bash
22 lines
474 B
Bash
#!/sbin/openrc-run
|
|
|
|
: ${OPTS:="-LSwd -Lf /dev/null"}
|
|
|
|
pidfile="/run/${SVCNAME}.pid"
|
|
command="/usr/sbin/${SVCNAME}"
|
|
command_args="-f -p ${pidfile} ${OPTS}"
|
|
command_background="yes"
|
|
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 $?
|
|
}
|