diff --git a/check-samba b/check-samba new file mode 100755 index 00000000..9d3477e7 --- /dev/null +++ b/check-samba @@ -0,0 +1,15 @@ +#!/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