diff --git a/scripts/restore b/scripts/restore index 2a5534a..ffc6870 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,7 +74,7 @@ ynh_script_progression --message="Restoring fail2ban configuration..." # If it doesn't exist, create the logfile, required before configuring fail2ban log4fail2ban="/var/log/nginx/${domain}-access.log" ynh_restore_file --origin_path="${log4fail2ban}" -if [ ! -f "${log4fail2ban}" ]; then +if [ ! -f "${log4fail2ban:-}" ]; then touch "${log4fail2ban}" fi diff --git a/scripts/upgrade b/scripts/upgrade index c96c558..ad8ddd4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,7 +107,7 @@ ynh_script_progression --message="Upgrading fail2ban configuration..." # If it doesn't exist, create the logfile, required before configuring fail2ban log4fail2ban="/var/log/nginx/${domain}-access.log" -if [ ! -f "${log4fail2ban}" ]; then +if [ ! -f "${log4fail2ban:-}" ]; then touch "${log4fail2ban}" fi