]> andersk Git - moira.git/blobdiff - gen/hesiod.sh
use abstraction barriers (init script) for restarting named
[moira.git] / gen / hesiod.sh
index fe5e84ce17d6510c83cce4a8ba01425f949179f8..df865d6ffd7d43ffa75b7a3a9cd601027b2ab6e4 100644 (file)
@@ -29,7 +29,7 @@ SRC_DIR=/etc/athena/_nameserver
 # Directory into which we will put the final product
 DEST_DIR=/etc/athena/nameserver
 
-NAMED=/etc/athena/named
+INIT=/etc/init.d/athena-bind
 NAMED_PID=/var/athena/named.pid
 
 # Create the destination directory if it doesn't exist
@@ -78,6 +78,7 @@ do
    # Make sure the file is not zero-length
    if test ! -z $file
    then
+      chmod o+r $file
       mv -f $file $DEST_DIR
       if test $? -ne 0
       then
@@ -96,13 +97,11 @@ done
 # First, get statistics
 /usr/athena/etc/rndc stats
 sleep 1
-kill -KILL `cat $NAMED_PID`
+$INIT stop
 rm -f $NAMED_PID
 
 # Restart named.
-$NAMED
-echo named started
-
+$INIT start
 sleep 1
 # This timeout is implemented by having the shell check TIMEOUT times
 # for the existance of $NAMED_PID and to sleep INTERVAL seconds
This page took 0.038226 seconds and 4 git commands to generate.