mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-29 05:12:18 +01:00
25 lines
639 B
Plaintext
25 lines
639 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
description="NSD is an authoritative-only, high performance, open source name server"
|
|
checkconf=/usr/sbin/nsd-checkconf
|
|
cfgfile=${NSD_CONFIG:-/etc/nsd/nsd.conf}
|
|
pidfile=$($checkconf -o pidfile $cfgfile)
|
|
pidfile=${pidfile:-/var/run/nsd/nsd.pid}
|
|
command=/usr/sbin/nsd
|
|
command_args=""
|
|
required_files="$cfgfile"
|
|
|
|
depend() {
|
|
need net
|
|
use logger
|
|
}
|
|
|
|
start_pre() {
|
|
ebegin
|
|
checkpath --directory --owner nsd:nsd ${pidfile%/*}
|
|
$checkconf $cfgfile
|
|
[ "$cfgfile" = "/etc/nsd/nsd.conf" ] || command_args="$command_args -c $cfgfile"
|
|
[ "$pidfile" = "/var/run/nsd/nsd.pid" ] || command_args="$command_args -P $pidfile"
|
|
eend $?
|
|
}
|