Show the duration of the run in seconds when the scripts exits sucessfully.

This commit is contained in:
Manuel Friedli 2020-08-18 23:54:37 +02:00
parent 70e98dd26d
commit 6ca00b6bc6

View file

@ -42,6 +42,8 @@ MY_IP="94.199.214.20"
MY_PORT="443"
# After this point, no editing is required.
start=$(date +%s)
# These suffixes must be appended to the respective addresses and subnets.
suffix8="/8"
suffix16="/16"
@ -501,4 +503,6 @@ while read -r addrwithsuffix ; do
exec_as_root fail2ban-client set "${jail}" banip "${addrwithsuffix}"
done < "${banlist}"
echo "${green}All done!${reset}"
end=$(date +%s)
echo "${green}All done in $((end - start)) seconds!${reset}"