diff --git a/roles/deploy-web/files/getinfo_day.sh b/roles/deploy-web/files/getinfo_day.sh index 22774dc..be4abf8 100755 --- a/roles/deploy-web/files/getinfo_day.sh +++ b/roles/deploy-web/files/getinfo_day.sh @@ -10,6 +10,10 @@ DAY=$(date +%u) if [ ${DAY} -eq 1 ]; then if [ ${WEEK} -ne "01" ]; then WEEK=$(echo "$WEEK-1" |bc) + if [ ${#WEEK} -eq 1 ]; then + WEEK="0${WEEK}" + fi + else WEEK="53" fi diff --git a/roles/deploy-web/files/getinfo_week.sh b/roles/deploy-web/files/getinfo_week.sh index a865df2..636e480 100755 --- a/roles/deploy-web/files/getinfo_week.sh +++ b/roles/deploy-web/files/getinfo_week.sh @@ -10,6 +10,9 @@ DAY=$(date +%u) if [ ${DAY} -eq 1 ]; then if [ ${WEEK} -ne "01" ]; then WEEK=$(echo "$WEEK-1" |bc) + if [ ${#WEEK} -eq 1 ]; then + WEEK="0${WEEK}" + fi else WEEK="53" fi @@ -33,6 +36,6 @@ do cat $directory_host/${j}_* |sort |uniq -c >> ${MAIL} echo "----------------" >> ${MAIL} done - cat ${MAIL} |mail -s "Rapport reverse proxy $DATE" valczebackup@gmail.com + cat ${MAIL} |mail -s "Rapport hebdomadaire reverse proxy $DATE" valczebackup@gmail.com #rm $directory_host/* done