15 lines
400 B
Bash
Executable file
15 lines
400 B
Bash
Executable file
#!/bin/zsh
|
|
#script shell par kif 01/10/00
|
|
|
|
LOG=/var/log/CransMisc/samba-master
|
|
master=`smbclient -N -L zamok |grep -A5 Master |grep CRANS |tail -c 6 `
|
|
|
|
if [ "$master" != 'ZAMOK' ];
|
|
then
|
|
echo -n `date` >> $LOG
|
|
echo " : le maitre est $master " >> $LOG
|
|
echo "Zamok n'est plus maitre ; je relance samba" >> $LOG
|
|
/id/samba restart >> $LOG 2>&1
|
|
#else
|
|
# echo zamok est encore maitre
|
|
fi
|