mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
feat: enable log rotation
This commit is contained in:
parent
19f633893e
commit
5760096cd1
4 changed files with 25 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
||||||
"en": "Backup your server with restic.",
|
"en": "Backup your server with restic.",
|
||||||
"fr": "Sauvegardez votre serveur avec restic."
|
"fr": "Sauvegardez votre serveur avec restic."
|
||||||
},
|
},
|
||||||
"version": "0.12.0~ynh7",
|
"version": "0.12.0~ynh8",
|
||||||
"url": "https://restic.net/",
|
"url": "https://restic.net/",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -106,6 +106,15 @@ systemctl start ${app}_check_read_data.timer
|
||||||
ynh_script_progression --message="Set permissions on ${final_path}"
|
ynh_script_progression --message="Set permissions on ${final_path}"
|
||||||
chown -R ${app}: ${final_path}
|
chown -R ${app}: ${final_path}
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP LOGROTATE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring logrotate"
|
||||||
|
ynh_use_logrotate --logfile=/var/log/restic_backup_${app}.log
|
||||||
|
ynh_use_logrotate --logfile=/var/log/restic_backup_${app}.err
|
||||||
|
ynh_use_logrotate --logfile=/var/log/restic_check_${app}.log
|
||||||
|
ynh_use_logrotate --logfile=/var/log/restic_check_${app}.err
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERATE SSH KEY
|
# GENERATE SSH KEY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -42,6 +42,12 @@ ynh_secure_remove "${final_path}/restic_log_${app}"
|
||||||
ynh_secure_remove "${final_path}/restic_check_log_${app}"
|
ynh_secure_remove "${final_path}/restic_check_log_${app}"
|
||||||
ynh_secure_remove "${final_path}"
|
ynh_secure_remove "${final_path}"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE LOGROTATE CONFIG
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing logrotate config"
|
||||||
|
ynh_remove_logrotate
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE SSH CONFIG
|
# REMOVE SSH CONFIG
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -149,7 +149,14 @@ systemctl start ${app}.timer
|
||||||
systemctl start ${app}_check.timer
|
systemctl start ${app}_check.timer
|
||||||
systemctl start ${app}_check_read_data.timer
|
systemctl start ${app}_check_read_data.timer
|
||||||
|
|
||||||
ynh_script_progression --message="End of upgrade process" --last
|
#=================================================
|
||||||
|
# SETUP LOGROTATE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring logrotate"
|
||||||
|
ynh_use_logrotate --logfile=/var/log/restic_backup_${app}.log
|
||||||
|
ynh_use_logrotate --logfile=/var/log/restic_backup_${app}.err
|
||||||
|
ynh_use_logrotate --logfile=/var/log/restic_check_${app}.log
|
||||||
|
ynh_use_logrotate --logfile=/var/log/restic_check_${app}.err
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE SSH CONFIG
|
# UPGRADE SSH CONFIG
|
||||||
|
@ -178,3 +185,4 @@ Host ${server}
|
||||||
# end $app ssh config
|
# end $app ssh config
|
||||||
EOCONF
|
EOCONF
|
||||||
fi
|
fi
|
||||||
|
ynh_script_progression --message="End of upgrade process" --last
|
||||||
|
|
Loading…
Add table
Reference in a new issue