On passe cron.script/bcfg2-report dans le dépôt bcfg2

This commit is contained in:
Vincent Le Gallic 2013-07-09 10:41:21 +02:00
parent e4c63b0148
commit 6cebaea21a
3 changed files with 13 additions and 0 deletions

View file

@ -8,6 +8,7 @@
<Service name="bcfg2-server"/>
<!-- Mise a jour des statistiques bcfg2 et envoi du mail -->
<Path name="/etc/cron.d/bcfg2-crans"/>
<Path name="/etc/cron.script/bcfg2-report"/>
<Path name="/etc/cron.daily/bcfg2-update-packages-list"/>
</Group>
</Bundle>

View file

@ -0,0 +1,9 @@
#!/bin/bash
day=`date '+%d'`
day1=$(($day-1))
day2=$(($day-2))
date=`date '+%Y-%m-'`
body=`/usr/sbin/bcfg2-reports -d | grep "${date}$day\|${date}$day1\|${date}$day2" | sort`
if [[ "$body" != "" ]]; then
echo "$body" | /usr/bin/mail -s "Serveurs non synchronisés avec bcfg2" -a "X-Mailer: bcfg2-reports" roots@crans.org
fi

View file

@ -0,0 +1,3 @@
<FileInfo>
<Info owner='root' group='root' perms='0755'/>
</FileInfo>