From 519418027794d009a0095b2b075cc3f3a03cf3d2 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 26 Nov 2023 17:37:06 +0100 Subject: [PATCH] fix some SC2086 --- helpers/fail2ban | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/fail2ban b/helpers/fail2ban index a2d068364..4d587163b 100644 --- a/helpers/fail2ban +++ b/helpers/fail2ban @@ -74,7 +74,7 @@ ynh_add_fail2ban_config() { ports=${ports:-http,https} use_template="${use_template:-0}" - if [ $use_template -ne 1 ]; then + if [ "$use_template" -ne 1 ]; then # Usage 1, no template. Build a config file from scratch. test -n "$logpath" || ynh_die --message="ynh_add_fail2ban_config expects a logfile path as first argument and received nothing." test -n "$failregex" || ynh_die --message="ynh_add_fail2ban_config expects a failure regex as second argument and received nothing." @@ -86,7 +86,7 @@ port = __PORTS__ filter = __APP__ logpath = __LOGPATH__ maxretry = __MAX_RETRY__ -" >$YNH_APP_BASEDIR/conf/f2b_jail.conf +" >"$YNH_APP_BASEDIR/conf/f2b_jail.conf" echo " [INCLUDES] @@ -94,7 +94,7 @@ before = common.conf [Definition] failregex = __FAILREGEX__ ignoreregex = -" >$YNH_APP_BASEDIR/conf/f2b_filter.conf +" >"$YNH_APP_BASEDIR/conf/f2b_filter.conf" fi ynh_add_config --template="f2b_jail.conf" --destination="/etc/fail2ban/jail.d/$app.conf"