mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
Add check of set and not null var log4fail2ban
suggestions from @ericgaspar Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
This commit is contained in:
parent
644fb9df4b
commit
c10cab9219
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue