Skip to content

Commit c846e38

Browse files
authored
Fixed exit codes
1 parent aba998d commit c846e38

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

fail2ban.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if [ "${*}" = "--help" ] || [ "${*}" = "-h" ] || [ "${*}" = "-?" ]; then
2525
printf " Sets the path for the Log\n--help | -h | -? : Displays this help menu"
2626
printf "\n--force | -f : Forces the start and doesn't ask for user input\n"
2727
printf "\n[Here will be more soon]\n\n\n"
28-
exit
28+
exit 0
2929
fi
3030
if [ "${*}" = "--force" ] || [ "${*}" = "-f" ]; then
3131
printf "\n${COL_YLW}########\n# ${COL_BLE}INFO ${COL_YLW}#\n########\n\n${COL_GRN}"
@@ -41,7 +41,7 @@ if [[ $frc != 1 ]]; then
4141
stty_cfg_t=$(stty -g)
4242
stty raw -echo ; input_t=$(head -c 1) ; stty $stty_cfg_t
4343
if echo "$input_t" | grep -iq "^n" ;then
44-
exit
44+
exit 0
4545
fi
4646
fi
4747
fi
@@ -91,10 +91,10 @@ if [ ! -f $F2B ]; then
9191
else
9292
printf "\n${COL_YLW}###########\n# ${COL_RED}WARNING ${COL_YLW}#\n###########\n\n${COL_RST}"
9393
printf "File was not found!\n"
94-
exit
94+
exit 0
9595
fi
9696
else
97-
exit
97+
exit 0
9898
fi
9999
else
100100
printf "\nFile path incorrect. Forcing end!"
@@ -118,4 +118,4 @@ printf "${COL_YLW}#\n#----------------------#\n# ${COL_GRN}Format:
118118
printf " ${COL_GRN}AMOUNT IP [EXPLOIT] ${COL_YLW}#\n########################\n\n${COL_RST}"
119119
grep "Ban " $F2B | awk -F[\ \:] '{print $10,$8}' | sort | uniq -c | sort -n
120120
printf "\n"
121-
exit
121+
exit 0

0 commit comments

Comments
 (0)