unbound: update to 1.5.2, improved rc script

This commit is contained in:
Juergen Daubert 2015-02-20 11:21:27 +01:00
parent ca450ab6e9
commit 2cc566ab61
3 changed files with 19 additions and 7 deletions

@ -1,2 +1,2 @@
20a8c112ea3ce0049dfe16f92614185e unbound
ed4c46476dcfb8a507cc08b1ba12a8f1 unbound-1.5.1.tar.gz
4efc120538752183b95d997e92d1795e unbound
4aae09f78509eaf002f7869e19f29321 unbound-1.5.2.tar.gz

@ -4,7 +4,7 @@
# Depends on: openssl expat
name=unbound
version=1.5.1
version=1.5.2
release=1
source=(http://www.unbound.net/downloads/$name-$version.tar.gz
unbound)

@ -3,21 +3,33 @@
# /etc/rc.d/crond: start/stop unbound daemon
#
SSD=/sbin/start-stop-daemon
PROG=/usr/sbin/unbound
PID=/var/run/unbound.pid
case $1 in
start)
/usr/sbin/unbound-anchor
/usr/sbin/unbound
$SSD --start --pidfile $PID --exec $PROG
;;
stop)
killall -q /usr/sbin/unbound
$SSD --stop --retry 10 --pidfile $PID
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
$SSD --status --pidfile $PID
case $? in
0) echo "$PROG is running" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
*)
echo "usage: $0 [start|stop|restart]"
echo "usage: $0 [start|stop|restart|status]"
;;
esac