scripts/check-samba
krempp fdb3f21560 ajout .log au nom du log (simplifie le logrotate..)
darcs-hash:20010127153447-92525-2b312c433554969f2b9e3955c29480dd5075df40.gz
2001-01-27 16:34:47 +01:00

15 lines
404 B
Bash
Executable file

#!/bin/zsh
#script shell par kif 01/10/00
LOG=/var/log/CransMisc/samba-master.log
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