scripts/check-samba
krempp f7412f4edd log dans le rep Crans, pour logrotate commun.
darcs-hash:20001220111502-92525-ecc7f7ff7e25450236359966a4d71cb8866fdc50.gz
2000-12-20 12:15:02 +01:00

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