darcs-hash:20030201171004-a279a-8580abd52c18c681de2a60e7b47a87952b30dad6.gz
This commit is contained in:
stransky 2003-02-01 18:10:04 +01:00
parent 5092e4b5a6
commit 11ab75bd85

View file

@ -16,7 +16,7 @@ master=$(smbclient -N -L zamok |grep -A5 Master |grep CRANS | awk '{print $2}')
if [ "$master" != 'ZAMOK' ];
then
echo "$(date) : Crans local master is \"$master\" ; waiting to confirm" >> $LOG
echo "$(date) : Crans local master is \"$master\" ; waiting to confirm..." >> $LOG
# on attend pour être sûr que zamok n'est pas justement en train de déclencher une élection :
sleep 30
# on refait le test :
@ -24,8 +24,7 @@ then
# Si on est sûr que ça chie, on sort les armes :
if [ "$master" != 'ZAMOK' ];
then
echo "$(date) : Crans local master is \"$master\"" >> $LOG
echo "$(date) : restarting samba" >> $LOG
echo "$(date) : Crans local master is \"$master\" ; restarting samba" >> $LOG
echo -n "$(date) : " >> $LOG
/id/samba stop >> $LOG 2>&1
echo -n "$(date) : " >> $LOG