nsd: move pid file and xfer dir to /run/nsd

This commit is contained in:
Juergen Daubert 2022-02-20 11:59:09 +01:00
parent 4405607673
commit b55f65cf0e
4 changed files with 42 additions and 16 deletions

View File

@ -2,7 +2,7 @@ drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/nsd/
-rw-r--r-- root/root etc/nsd/nsd.conf.sample
drwxr-xr-x root/root etc/rc.d/
lrwxrwxrwx root/root etc/rc.d/nsd -> /usr/sbin/nsd-control
-rwxr-xr-x root/root etc/rc.d/nsd
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/nsd
@ -22,6 +22,4 @@ drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/nsd.8.gz
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/lib/
drwxr-xr-x nsd/root var/lib/nsd/
drwxr-xr-x root/root var/run/
drwxr-xr-x nsd/root var/run/nsd/
drwxr-xr-x nsd/nsd var/lib/nsd/

View File

@ -1,7 +1,8 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/eQdKdWysJplO2LSfA9ROIQrn5U8owrgXj+Y41AZVawIQ3KgOw/e+wb4bxknijIbyKcxrbbEsQEdywoyXnBY8A4=
SHA256 (Pkgfile) = a9d3bdf36859592804105ddffb8b8d0251db5151f98258592b80f30eadd54e1b
SHA256 (.footprint) = e7c1c5de89399eb933cfdad3ceff7b6500a1726c7d8388d9ee9dfabcef8545bf
RWSE3ohX2g5d/UIkRkbtqdY3gFm4Go27QQKMQTvF2OR8SUnjX7ZHMuL3hPaJRN7CdOeIUJSorMDy2Qr95imK+xiNgbBs2qGIfQc=
SHA256 (Pkgfile) = 65ea68ebd9f88c2433d24043a8ce04b7c10794325b54377626f7f21e3e7fd821
SHA256 (.footprint) = 36d5547b14fd0dcc03ed75bdf1989d32183b31e207faf510908fadbcb75bec62
SHA256 (nsd-4.4.0.tar.gz) = cfcd6fdd99344ca5a7ef7c2940c241bcef471fc3252ba3dcbd4c57e0638e8836
SHA256 (README) = 0dcc9d869c404b81deb9713e40f5d60e9b1e144c8f59b0ce4c633f3f1139eb8e
SHA256 (pre-install) = 3082d6ae0dc1d1e60942e91a2db33019b2b53c62a06d12db2be52b2a1524ea27
SHA256 (nsd) = 58e5676bc3f70431b961b7b979ed2cf6a31ddef7f09e4a4104434a28440d0740

View File

@ -1,13 +1,13 @@
# Description: Authoritative only, high performance name server
# URL: http://www.nlnetlabs.nl/projects/nsd/
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: openssl
# Depends on: openssl libevent
name=nsd
version=4.4.0
release=1
release=2
source=(http://www.nlnetlabs.nl/downloads/nsd/$name-$version.tar.gz
README pre-install)
README pre-install nsd)
build() {
cd $name-$version
@ -17,17 +17,16 @@ build() {
--sysconfdir=/etc \
--localstatedir=/var \
--with-dbfile=/var/lib/nsd/nsd.db \
--with-pidfile=/var/run/nsd/nsd.pid \
--with-xfrdir=/var/run/nsd \
--without-libevent \
--with-pidfile=/run/nsd/nsd.pid \
--with-xfrdir=/run/nsd \
--with-user=nsd
make all nsd-mem
make DESTDIR=$PKG install
install -m 0755 nsd-mem $PKG/usr/sbin
install -d $PKG/etc/rc.d
ln -s /usr/sbin/nsd-control $PKG/etc/rc.d/nsd
install -D $SRC/nsd $PKG/etc/rc.d/nsd
chown nsd $PKG/var/{lib,run}/nsd
chown nsd:nsd $PKG/var/lib/nsd
rm -r $PKG/run
}

28
nsd/nsd Normal file
View File

@ -0,0 +1,28 @@
#!/bin/sh
#
# /etc/rc.d/nsd: start/stop nsd daemon
#
PROG=/usr/sbin/nsd-control
case $1 in
start)
install -o nsd -g nsd -m 0755 -d /run/nsd
$PROG start
;;
stop)
$PROG stop
;;
restart)
$0 stop
$0 start
;;
status)
$PROG status
;;
*)
$PROG "$@"
;;
esac
# End of file