knot: update to 2.1.1

Signed-off-by: Daniel Salzman <daniel.salzman@nic.cz>
This commit is contained in:
Daniel Salzman
2016-02-11 17:31:08 +01:00
parent ac633e9f3f
commit 4a54847916
8 changed files with 200 additions and 169 deletions
+30 -36
View File
@@ -1,45 +1,39 @@
#!/bin/sh /etc/rc.common
START=70
#
# Copyright (C) 2014-2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
#
# This is free software, licensed under the GNU General Public License v2.
knot_bin="/usr/sbin/knotd"
knot_ctl="/usr/sbin/knotc"
config_file="/etc/knot/knot.conf"
pid_file="/var/run/knot.pid"
START=50
USE_PROCD=1
start() {
echo "Starting Knot DNS"
PROG="/usr/sbin/knotd"
CONFFILE="/etc/knot/knot.conf"
if [ -e $pid_file ]; then
echo " Already running with PID `cat $pid_file`"
return 1
fi
USER="knot"
USERID="5353"
RUNDIR="/var/run/knot"
STORAGE="/var/lib/knot"
$knot_bin -c $config_file -d
fix_perms() {
user_exists $USER $USERID || user_add $USER $USERID
group_exists $USER $USERID || group_add $USER $USERID
if [ $? -ne 0 ]; then
echo " Failed to start"
fi
for dir in $RUNDIR $STORAGE; do
test -e $dir || {
mkdir -p $dir
chgrp $USER $dir
chmod g+w $dir
}
chgrp $USER $CONFFILE
chmod g+r $CONFFILE
done
}
stop() {
echo "Stopping Knot DNS"
if [ -e $pid_file ]; then
kill `cat $pid_file`
rm -f $pid_file
else
echo " No PID file $pid_file"
return 1
fi
}
restart() {
stop
start
}
reload() {
echo "Reloading Knot DNS"
$knot_ctl -c $config_file reload
start_service() {
fix_perms
procd_open_instance
procd_set_param command $PROG -c $CONFFILE
procd_set_param respawn
procd_close_instance
}
+1 -2
View File
@@ -1,8 +1,7 @@
#!/bin/sh
cd `dirname "$0"`/tests
../tap/runtests -b /tmp ./test_*
../tap/runtests -b /tmp ./dnssec_test_* ./test_*
ret=$?
cd -