mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-13 03:42:37 +01:00
38 lines
586 B
Plaintext
38 lines
586 B
Plaintext
#!/sbin/runscript
|
|
|
|
# Sample init.d file for alpine linux.
|
|
|
|
daemon=/usr/bin/nrpe
|
|
conf=/etc/nrpe.cfg
|
|
|
|
depend() {
|
|
need net
|
|
after firewall
|
|
}
|
|
|
|
get_pidfile() {
|
|
if [ -r $conf ]; then
|
|
pidfile=$(awk -F= '/^pid_file/ {print $2}' $conf)
|
|
fi
|
|
pidfile=${pidfile:-/var/run/nrpe.pid}
|
|
}
|
|
|
|
start() {
|
|
get_pidfile
|
|
ebegin "Starting NRPE"
|
|
start-stop-daemon --start --quiet \
|
|
--pidfile $pidfile \
|
|
--exec $daemon -- -d ${nrpe_options:- -c $conf}
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
get_pidfile
|
|
ebegin "Stopping NRPE"
|
|
start-stop-daemon --stop --quiet \
|
|
--exec $daemon \
|
|
--pidfile $pidfile
|
|
eend $?
|
|
}
|
|
|