]> andersk Git - moira.git/blob - gen/hesiod.sh
change way named is restarted [wesommer]
[moira.git] / gen / hesiod.sh
1 #! /bin/sh
2 TARFILE=/tmp/hesiod
3 SRC_DIR=/etc/athena/_nameserver
4 DEST_DIR=/etc/athena/nameserver
5 if [ ! -d $SRC_DIR ]; then
6         /bin/rm -f $SRC_DIR
7         /bin/mkdir $SRC_DIR
8         /bin/chmod 755 $SRC_DIR
9 fi
10 #if [ ! -d $DEST_DIR ]; then
11 #       /bin/rm -f $DEST_DIR
12 #       /bin/mkdir $DEST_DIR
13 #       /bin/chmod 755 $DEST_DIR
14 #fi
15 cd $SRC_DIR
16 for file in `/bin/tar tf $TARFILE`; do 
17         if [ ./ = $file ]; then continue; fi
18         /bin/tar xf $TARFILE $file
19         if [ -s $file ]; then
20                 /bin/mv -f $file $DEST_DIR
21         else
22                 /bin/rm -f $file
23         fi
24 done
25
26 /bin/rm -f $TARFILE
27 kill -KILL `/bin/cat /etc/named.pid`
28
29 csh -fc "unlimit; /etc/named"
30
31 rm -f $0
32 exit
33 #
34 #       $Source$
35 #       $Header$
36 #
This page took 0.057414 seconds and 5 git commands to generate.