diff --git a/Bundler/bcfg2.xml b/Bundler/bcfg2.xml index 7d2e47d..dda23e9 100644 --- a/Bundler/bcfg2.xml +++ b/Bundler/bcfg2.xml @@ -8,6 +8,7 @@ + diff --git a/Cfg/etc/cron.script/bcfg2-report/bcfg2-report b/Cfg/etc/cron.script/bcfg2-report/bcfg2-report new file mode 100644 index 0000000..a39a264 --- /dev/null +++ b/Cfg/etc/cron.script/bcfg2-report/bcfg2-report @@ -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 diff --git a/Cfg/etc/cron.script/bcfg2-report/info.xml b/Cfg/etc/cron.script/bcfg2-report/info.xml new file mode 100644 index 0000000..a0b21f3 --- /dev/null +++ b/Cfg/etc/cron.script/bcfg2-report/info.xml @@ -0,0 +1,3 @@ + + +