Fix interactive unban

This commit is contained in:
2025-08-13 16:32:43 -04:00
parent 2b62d5791b
commit 446a294ea6

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Unbans a fail2ban IP # Unban a fail2ban IP
# Copyright 2021-2025 Bryan C. Roessler # Copyright 2021-2025 Bryan C. Roessler
# Licensed under the Apache License, Version 2.0 # Licensed under the Apache License, Version 2.0
p="${BASH_SOURCE[0]%/*}"; [[ -r $p/script-functions ]] && . "$p"/script-functions || exit 1 p="${BASH_SOURCE[0]%/*}"; [[ -r $p/script-functions ]] && . "$p"/script-functions || exit 1
@@ -11,7 +11,7 @@ is_root
if [[ $# -eq 1 ]]; then if [[ $# -eq 1 ]]; then
ip_address="$1" ip_address="$1"
else else
prompt ip_address ip_address=$(prompt ip_address)
fi fi
if fail2ban-client set sshd unbanip "$ip_address"; then if fail2ban-client set sshd unbanip "$ip_address"; then