|
|
@ -11,8 +11,17 @@ echo -n "" >.errors |
|
|
|
parallel -a "$FILE" ./monit-sympa.sh |
|
|
|
|
|
|
|
if [[ -f .errors ]]; then |
|
|
|
echo "--------------------" |
|
|
|
echo " $(cat .errors | wc -l) errors detected!" |
|
|
|
echo "--------------------" |
|
|
|
|
|
|
|
count=$(cat .errors | wc -l) |
|
|
|
if [[ $count -gt 0 ]]; then |
|
|
|
echo -e "--------------------" |
|
|
|
echo -e " \e[0;31m$count\e[0m errors detected!" |
|
|
|
echo -e "--------------------" |
|
|
|
cat .errors |
|
|
|
else |
|
|
|
echo -e "\e[0;32m------------------------\e[0m" |
|
|
|
echo -e "everything 's \e[0;32mall right!\e[0m" |
|
|
|
echo -e "\e[0;32m------------------------\e[0m" |
|
|
|
fi |
|
|
|
|
|
|
|
fi |