fix script day and week
This commit is contained in:
parent
5dca6fbdc9
commit
8ed95bc32b
@ -10,6 +10,10 @@ DAY=$(date +%u)
|
|||||||
if [ ${DAY} -eq 1 ]; then
|
if [ ${DAY} -eq 1 ]; then
|
||||||
if [ ${WEEK} -ne "01" ]; then
|
if [ ${WEEK} -ne "01" ]; then
|
||||||
WEEK=$(echo "$WEEK-1" |bc)
|
WEEK=$(echo "$WEEK-1" |bc)
|
||||||
|
if [ ${#WEEK} -eq 1 ]; then
|
||||||
|
WEEK="0${WEEK}"
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
WEEK="53"
|
WEEK="53"
|
||||||
fi
|
fi
|
||||||
|
@ -10,6 +10,9 @@ DAY=$(date +%u)
|
|||||||
if [ ${DAY} -eq 1 ]; then
|
if [ ${DAY} -eq 1 ]; then
|
||||||
if [ ${WEEK} -ne "01" ]; then
|
if [ ${WEEK} -ne "01" ]; then
|
||||||
WEEK=$(echo "$WEEK-1" |bc)
|
WEEK=$(echo "$WEEK-1" |bc)
|
||||||
|
if [ ${#WEEK} -eq 1 ]; then
|
||||||
|
WEEK="0${WEEK}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
WEEK="53"
|
WEEK="53"
|
||||||
fi
|
fi
|
||||||
@ -33,6 +36,6 @@ do
|
|||||||
cat $directory_host/${j}_* |sort |uniq -c >> ${MAIL}
|
cat $directory_host/${j}_* |sort |uniq -c >> ${MAIL}
|
||||||
echo "----------------" >> ${MAIL}
|
echo "----------------" >> ${MAIL}
|
||||||
done
|
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/*
|
#rm $directory_host/*
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user