1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00

backup & restore logs (#179)

This commit is contained in:
OniriCorpe 2024-03-21 04:34:55 +01:00 committed by GitHub
parent f3c17dd9ec
commit e7b30b8fd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 9 deletions

View file

@ -33,6 +33,12 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# BACKUP LOGS
#=================================================
ynh_backup --src_path="/var/log/nginx/$domain-access.log"
#=================================================
# SPECIFIC BACKUP
#=================================================

View file

@ -36,6 +36,17 @@ ynh_script_progression --message="Restoring system configurations related to $ap
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE LOGS
#=================================================
ynh_script_progression --message="Restoring the log files..." --weight=1
ynh_restore_file --origin_path="/var/log/nginx/$domain-access.log"
log_path="/var/log/$app"
mkdir -p "$log_path"
chown "$app":www-data "$log_path"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
@ -50,15 +61,6 @@ ynh_script_progression --message="Restoring the Cron configuration..." --weight=
ynh_restore_file --origin_path="/etc/cron.d/$app"
#=================================================
# RESTORE THE LOG FILES
#=================================================
ynh_script_progression --message="Restoring the log files..." --weight=1
log_path="/var/log/$app"
mkdir -p "$log_path"
chown "$app":www-data "$log_path"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================