diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-06-06 12:03:23 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-06-06 12:03:23 -0300 |
commit | 602bbc9f8ca0debe0fe88aac1ddc969c405f96b0 (patch) | |
tree | 34c0b1890fadd22588d98422a3cc2c2909094216 /testing/bind/named | |
parent | a356d89e91e7ce1dd622d6dfe1b13412923d3b96 (diff) | |
parent | 664b1c2195b2884102cc2d5a56a13702f8ee44fe (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
extra/postgresql/PKGBUILD
libre/gstreamer0.10-bad-libre/PKGBUILD
Diffstat (limited to 'testing/bind/named')
-rwxr-xr-x | testing/bind/named | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/bind/named b/testing/bind/named new file mode 100755 index 000000000..7907f9983 --- /dev/null +++ b/testing/bind/named @@ -0,0 +1,52 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/named + +[[ -d /var/run/named ]] || mkdir -p /var/run/named +chown named:named /var/run/named + +PIDFILE=/var/run/named/named.pid +PID=$(cat $PIDFILE 2>/dev/null) +readlink -q /proc/$PID/exe | grep -q '^/usr/sbin/named' || { PID=; rm $PIDFILE 2>/dev/null; } + +case "$1" in + start) + stat_busy "Starting BIND" + [ -z "$PID" ] && /usr/sbin/named ${NAMED_ARGS} + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon named + stat_done + fi + ;; + stop) + stat_busy "Stopping BIND" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon named + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + reload) + stat_busy "Reloading BIND" + [ ! -z "$PID" ] && rndc reload &>/dev/null || kill -HUP $PID &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + ;; + *) + echo "usage: $0 {start|stop|reload|restart}" +esac +exit 0 |