On passe cron.script/bcfg2-report dans le dépôt bcfg2
This commit is contained in:
parent
e4c63b0148
commit
6cebaea21a
3 changed files with 13 additions and 0 deletions
|
@ -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>
|
||||
|
|
9
Cfg/etc/cron.script/bcfg2-report/bcfg2-report
Normal file
9
Cfg/etc/cron.script/bcfg2-report/bcfg2-report
Normal 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
|
3
Cfg/etc/cron.script/bcfg2-report/info.xml
Normal file
3
Cfg/etc/cron.script/bcfg2-report/info.xml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<FileInfo>
|
||||
<Info owner='root' group='root' perms='0755'/>
|
||||
</FileInfo>
|
Loading…
Add table
Add a link
Reference in a new issue