diff --git a/sources b/sources index 841a3c6..3f41085 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -43586f18b4d917887c92a35ff460c923 unbound-1.1.1.tar.gz 2517f811ec4939c0ea602c99a6fdea23 unbound-1.2.0.tar.gz diff --git a/unbound.init b/unbound.init index 3df6048..db1b3d3 100644 --- a/unbound.init +++ b/unbound.init @@ -25,6 +25,7 @@ exec="/usr/sbin/unbound" config="/etc/unbound/unbound.conf" rootdir="/var/lib/unbound" pidfile="/var/run/unbound/unbound.pid" +piddir=`dirname $pidfile` [ -e /etc/sysconfig/unbound ] && . /etc/sysconfig/unbound @@ -33,6 +34,8 @@ lockfile=/var/lock/subsys/unbound start() { [ -x $exec ] || exit 5 [ -f $config ] || exit 6 + # /var/run could (and should) be tmpfs + [ -d $piddir ] || mkdir $piddir if [ ! -f /etc/unbound/unbound_control.key ] then @@ -46,7 +49,7 @@ start() { echo -n $"Starting unbound: " # if not running, start it up here - daemon $exec + daemon --pidfile=$pidfile $exec retval=$? [ $retval -eq 0 ] && touch $lockfile echo