mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
restore: create file for fail2ban if not exist
This commit is contained in:
parent
546eddc15d
commit
09e0b5101e
1 changed files with 6 additions and 0 deletions
|
@ -71,6 +71,12 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
|||
#=================================================
|
||||
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"
|
||||
if [ ! -f "${log4fail2ban}" ]; then
|
||||
touch "${log4fail2ban}"
|
||||
fi
|
||||
|
||||
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
||||
ynh_systemd_action --action=restart --service_name=fail2ban
|
||||
|
|
Loading…
Add table
Reference in a new issue