initial import

darcs-hash:20000522114755-92525-69a72999157b346a9dee061f02d4c3e416f951b2.gz
This commit is contained in:
krempp 2000-05-22 13:47:55 +02:00
parent 072fbadd44
commit 53e27f3168
2 changed files with 39 additions and 0 deletions

24
mailWarn_dirtyEtc.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
#
# Envoie la liste des fichiers modifiés localement.
#
tempF=$(tempfile -d /tmp -p "cvs_list")
tempF2=$(tempfile -d /tmp -p "cvs_list")
tempF3=$(tempfile -d /tmp -p "cvs_list")
( echo "Subject: Status de etc"
echo "To: $1"
echo ""
echo "Liste des fichiers non synchros"
echo "-------------------------------"
) > $tempF 2>&1
cd /etc
/usr/bin/cvs -q -d /usr/cvs-rep status | grep -A8 Locally > $tempF2
if test -n "$1";
then test -s $tempF2 && cat $tempF $tempF2 | sendmail "$1";
else cat $tempF $tempF2;
fi

15
save-etc Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
freq="$1"
nb=$2
pref="/backups/tars/etc${freq}-"
suff=`date +"%Y-%m-%d--%H-%M-%S.tgz"`
tarball="${pref}${suff}"
umask 077
cd /
tar zcf ${tarball} etc usr/scripts root/scripts home/corbeau/scripts
rm `ls -t ${pref}* | tail +$nb`
#df