petits ajustements.
N. darcs-hash:20030207132546-a279a-305d9959128454270b5afe432bd3a42786d2f6d0.gz
This commit is contained in:
parent
7f07072806
commit
0dff5c61c6
1 changed files with 4 additions and 3 deletions
|
@ -18,7 +18,7 @@ if [ "$master" != 'ZAMOK' ];
|
||||||
then
|
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 :
|
# on attend pour être sûr que zamok n'est pas justement en train de déclencher une élection :
|
||||||
sleep 30
|
sleep 35
|
||||||
# on refait le test :
|
# on refait le test :
|
||||||
master=$(smbclient -N -L zamok |grep -A5 Master |grep CRANS | awk '{print $2}')
|
master=$(smbclient -N -L zamok |grep -A5 Master |grep CRANS | awk '{print $2}')
|
||||||
# Si on est sûr que ça chie, on sort les armes :
|
# Si on est sûr que ça chie, on sort les armes :
|
||||||
|
@ -27,8 +27,9 @@ then
|
||||||
echo "$(date) : Crans local master is \"$master\" ; restarting samba" >> $LOG
|
echo "$(date) : Crans local master is \"$master\" ; restarting samba" >> $LOG
|
||||||
echo -n "$(date) : " >> $LOG
|
echo -n "$(date) : " >> $LOG
|
||||||
/id/samba stop >> $LOG 2>&1
|
/id/samba stop >> $LOG 2>&1
|
||||||
|
sleep 1
|
||||||
echo -n "$(date) : " >> $LOG
|
echo -n "$(date) : " >> $LOG
|
||||||
killall -9 nmbd && echo "remaining nmbd process killed" >> $LOG 2>&1 # tant qu'à faire on peut killer complètement nmbd
|
(killall -9 nmbd && echo "remaining nmbd process killed") >> $LOG 2>&1 # tant qu'à faire on peut killer complètement nmbd
|
||||||
echo -n "$(date) : " >> $LOG
|
echo -n "$(date) : " >> $LOG
|
||||||
/id/samba start >> $LOG 2>&1
|
/id/samba start >> $LOG 2>&1
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue