mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
backup: add fail2ban log file in backup
and restore it
This commit is contained in:
parent
09e0b5101e
commit
644fb9df4b
2 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,7 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
|
|||
# BACKUP FAIL2BAN CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/var/log/nginx/$domain-access.log"
|
||||
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
||||
|
||||
|
|
|
@ -73,6 +73,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
|
||||
touch "${log4fail2ban}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue