diff --git a/unbound/.md5sum b/unbound/.md5sum index 700d51785..574ee5d49 100644 --- a/unbound/.md5sum +++ b/unbound/.md5sum @@ -1,2 +1,2 @@ -20a8c112ea3ce0049dfe16f92614185e unbound -ed4c46476dcfb8a507cc08b1ba12a8f1 unbound-1.5.1.tar.gz +4efc120538752183b95d997e92d1795e unbound +4aae09f78509eaf002f7869e19f29321 unbound-1.5.2.tar.gz diff --git a/unbound/Pkgfile b/unbound/Pkgfile index 868285886..1142e538b 100644 --- a/unbound/Pkgfile +++ b/unbound/Pkgfile @@ -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) diff --git a/unbound/unbound b/unbound/unbound index 990b6b1d3..df0877d7a 100644 --- a/unbound/unbound +++ b/unbound/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