network/unbound: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Badchay 2024-01-03 10:04:47 +07:00 committed by Willy Sudiarto Raharjo
parent 86ea6762e0
commit 04ee3527ba
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
3 changed files with 13 additions and 13 deletions

View File

@ -5,7 +5,7 @@
UNBOUND=/usr/sbin/unbound
CONFIG=/etc/unbound/unbound.conf
PIDFILE=/var/run/unbound/unbound.pid
PIDFILE=/run/unbound/unbound.pid
LOGDIR=/var/log/unbound
# Unbound-control is useful but I'm not going to cram it
@ -30,7 +30,7 @@ initchecks() {
echo "Removing $PIDFILE"
rm -vf $PIDFILE
fi
# Check that /var/run/unbound exists. If not, create and chown it.
# Check that /run/unbound exists. If not, create and chown it.
if [ ! -e $(dirname $PIDFILE) ]; then
mkdir -p $(dirname $PIDFILE)
chown unbound:unbound $(dirname $PIDFILE)

View File

@ -9,8 +9,8 @@
; on server FTP.INTERNIC.NET
; -OR- RS.INTERNIC.NET
;
; last update: October 24, 2023
; related version of root zone: 2023102402
; last update: December 20, 2023
; related version of root zone: 2023122001
;
; FORMERLY NS.INTERNIC.NET
;
@ -21,8 +21,8 @@ A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
; FORMERLY NS1.ISI.EDU
;
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 199.9.14.201
B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:200::b
B.ROOT-SERVERS.NET. 3600000 A 170.247.170.2
B.ROOT-SERVERS.NET. 3600000 AAAA 2801:1b8:10::b
;
; FORMERLY C.PSI.NET
;

View File

@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=unbound
VERSION=${VERSION:-1.19.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -121,7 +121,7 @@ PYTHON_VERSION="$UNB_PY_VERSION" \
--with-pythonmodule \
--with-pyunbound \
--with-username=$UB_USER \
--with-pidfile=/var/run/unbound/unbound.pid \
--with-pidfile=/run/unbound/unbound.pid \
--with-rootkey-file=/var/lib/unbound/root.key \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux \
@ -169,7 +169,7 @@ sed -i \
-e 's/# logfile: ""/logfile: "\/var\/log\/unbound\/unbound.log"/g' \
-e 's/# chroot: "\/etc\/unbound"/chroot: ""/g' \
-e 's/# num-threads: 1/num-threads: '$(nproc)' # Set to the value of nproc by SlackBuild/g' \
-e 's/# root-hints: ""/root-hints: "\/etc\/unbound\/root.hints"/g' \
-e 's/# root-hints: ""/root-hints: "\/var\/lib\/unbound\/root.hints"/g' \
-e 's/# prefetch: no/prefetch: yes/g' \
-e 's/# harden-glue: yes/harden-glue: yes/g' \
-e 's/# harden-dnssec-stripped: yes/harden-dnssec-stripped: yes/g' \
@ -179,18 +179,18 @@ sed -i \
-e '/# auto-trust-anchor-file: ".*/a\ auto-trust-anchor-file: "/var/lib/unbound/root.key"' \
$PKG/etc/unbound/unbound.conf \
mkdir -p $PKG/var/run/unbound
mkdir -p $PKG/run/unbound
mkdir -p $PKG/var/log/unbound
mkdir -p $PKG/var/lib/unbound
mkdir -p $PKG/etc/logrotate.d
chown $UB_USER:$UB_GROUP $PKG/var/run/unbound/
chown $UB_USER:$UB_GROUP $PKG/run/unbound/
chown $UB_USER:$UB_GROUP $PKG/var/log/unbound/
chown $UB_USER:$UB_GROUP $PKG/var/lib/unbound/
cp -a $CWD/unbound.logrotate $PKG/etc/logrotate.d/unbound.new
cp -a $CWD/root.hints $PKG/etc/unbound/root.hints
chown root:root $PKG/etc/unbound/root.hints
cp -a $CWD/root.hints $PKG/var/lib/unbound/root.hints
chown $UB_USER:$UB_GROUP $PKG/var/lib/unbound/root.hints
chown root:root $PKG/etc/logrotate.d/unbound.new
mv $PKG/etc/unbound/unbound.conf $PKG/etc/unbound/unbound.conf.new
install -m 0644 -D $CWD/rc.unbound $PKG/etc/rc.d/rc.unbound.new