Added support to init script for when /var/run is mounted as tmpfs, and

/var/run/unbound does not exist. Also fixed daemon call to supply the
    pidfile (since it is in a subdir and not straight in /var/run.
This commit is contained in:
Paul Wouters 2009-01-26 23:02:22 +00:00
parent 6719db829b
commit 71ea33a239
2 changed files with 4 additions and 2 deletions

View File

@ -1,2 +1 @@
43586f18b4d917887c92a35ff460c923 unbound-1.1.1.tar.gz
2517f811ec4939c0ea602c99a6fdea23 unbound-1.2.0.tar.gz

View File

@ -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