Show the duration of the run in seconds when the scripts exits sucessfully.
This commit is contained in:
parent
70e98dd26d
commit
6ca00b6bc6
1 changed files with 5 additions and 1 deletions
|
@ -42,6 +42,8 @@ MY_IP="94.199.214.20"
|
||||||
MY_PORT="443"
|
MY_PORT="443"
|
||||||
|
|
||||||
# After this point, no editing is required.
|
# After this point, no editing is required.
|
||||||
|
start=$(date +%s)
|
||||||
|
|
||||||
# These suffixes must be appended to the respective addresses and subnets.
|
# These suffixes must be appended to the respective addresses and subnets.
|
||||||
suffix8="/8"
|
suffix8="/8"
|
||||||
suffix16="/16"
|
suffix16="/16"
|
||||||
|
@ -501,4 +503,6 @@ while read -r addrwithsuffix ; do
|
||||||
exec_as_root fail2ban-client set "${jail}" banip "${addrwithsuffix}"
|
exec_as_root fail2ban-client set "${jail}" banip "${addrwithsuffix}"
|
||||||
done < "${banlist}"
|
done < "${banlist}"
|
||||||
|
|
||||||
echo "${green}All done!${reset}"
|
end=$(date +%s)
|
||||||
|
|
||||||
|
echo "${green}All done in $((end - start)) seconds!${reset}"
|
||||||
|
|
Loading…
Reference in a new issue