Search
j0ke.net Open Build Service
>
Projects
>
home:opeter
>
powerdns
> pdns-3.1-init.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File pdns-3.1-init.patch of Package powerdns (Revision 14)
Currently displaying revision
14
,
show latest
--- pdns/pdns.in.old 2012-03-09 18:56:55.000000000 +0100 +++ pdns/pdns.in 2012-03-17 18:40:47.688025622 +0100 @@ -1,20 +1,23 @@ #!/bin/sh -# chkconfig: - 80 75 -# description: PDNS is a versatile high performance authoritative nameserver +# +# powerdns This shell script takes care of starting and stopping powerdns. +# +# chkconfig: 345 80 75 +# description: PowerDNS is a versatile high performance \ +# authoritative nameserver +# probe: true +# processname: powerdns +# pidfile: /var/run/powerdns/powerdns.pid +# config: /etc/powerdns/pdns.conf -### BEGIN INIT INFO -# Provides: pdns -# Required-Start: $remote_fs $network $syslog -# Required-Stop: $remote_fs $network $syslog -# Should-Start: $all -# Should-Stop: $all -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start/stop PowerDNS authoritative server -# Description: Start/stop PowerDNS authoritative server -### END INIT INFO +# Source function library. +. /etc/rc.d/init.d/functions -set -e +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ "${NETWORKING}" = "no" ] && exit 0 prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -28,11 +31,13 @@ cd $SOCKETPATH suffix=$(basename $0 | cut -d- -f2- -s) -if [ -n "$suffix" ] +if [ $suffix != "server" ] then + [ -f /etc/pdns/$suffix/pdns.conf ] || exit 0 EXTRAOPTS=--config-name=$suffix PROGNAME=pdns-$suffix else + [ -f /etc/pdns/pdns.conf ] || exit 0 PROGNAME=pdns fi @@ -62,6 +67,7 @@ if test "$NOTRUNNING" = "0" then doPC quit + rm -f /var/lock/subsys/pdns echo $ret else echo "not running" @@ -72,6 +78,7 @@ force-stop) echo -n "Stopping PowerDNS authoritative nameserver: " killall -v -9 pdns_server + rm -f /var/lock/subsys/pdns echo "killed" ;; @@ -83,6 +90,7 @@ else if $pdns_server --daemon --guardian=yes then + touch /var/lock/subsys/pdns echo "started" fi fi