Search
j0ke.net Open Build Service
>
Projects
>
server:dns
>
pdns-server
> pdns-3.2-init.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File pdns-3.2-init.patch of Package pdns-server
--- pdns/pdns.in 2012-12-04 10:21:27.000000000 +0100 +++ pdns/pdns.in.new 2012-12-13 20:12:45.105304715 +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: -# 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/powerdns/$suffix/pdns.conf ] || exit 0 EXTRAOPTS=--config-name=$suffix PROGNAME=pdns-$suffix else + [ -f /etc/powerdns/pdns.conf ] || exit 0 PROGNAME=pdns fi @@ -63,6 +68,7 @@ if test "$NOTRUNNING" = "0" then doPC quit + rm -f /var/lock/subsys/pdns echo $ret else echo "not running" @@ -73,6 +79,7 @@ force-stop) echo -n "Stopping PowerDNS authoritative nameserver: " killall -v -9 pdns_server + rm -f /var/lock/subsys/pdns echo "killed" ;; @@ -84,6 +91,7 @@ else if $pdns_server --daemon --guardian=yes then + touch /var/lock/subsys/pdns echo "started" else echo "starting failed"