1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/restic_ynh.git synced 2024-09-03 20:16:22 +02:00

fix: missing log files

This commit is contained in:
Lionel Coupouchetty-Ramouchetty 2021-04-02 12:20:32 +02:00
parent a4ec6bdc1d
commit 06a6586ee4
3 changed files with 22 additions and 1 deletions

View file

@ -6,7 +6,7 @@
"en": "Backup your server with restic.",
"fr": "Sauvegardez votre serveur avec restic."
},
"version": "0.12.0~ynh9",
"version": "0.12.0~ynh10",
"url": "https://restic.net/",
"license": "BSD-2-Clause",
"maintainer": {

View file

@ -106,6 +106,16 @@ systemctl start ${app}_check_read_data.timer
ynh_script_progression --message="Set permissions on ${final_path}"
chown -R ${app}: ${final_path}
#=================================================
# FIX https://github.com/ashemsay/restic_ynh/issues/17
#=================================================
for log in restic_backup_${app}.log restic_backup_${app}.err restic_check_${app}.log restic_check_${app}.err;do
if [ -d "/var/log/${log}" ];then
rmdir /var/log/${log}
fi
touch /var/log/${log}
chown ${app}: /var/log/${log}
done
#=================================================
# SETUP LOGROTATE
#=================================================

View file

@ -149,6 +149,17 @@ systemctl start ${app}.timer
systemctl start ${app}_check.timer
systemctl start ${app}_check_read_data.timer
#=================================================
# FIX https://github.com/ashemsay/restic_ynh/issues/17
#=================================================
for log in restic_backup_${app}.log restic_backup_${app}.err restic_check_${app}.log restic_check_${app}.err;do
if [ -d "/var/log/${log}" ];then
rmdir /var/log/${log}
fi
touch /var/log/${log}
chown ${app}: /var/log/${log}
done
#=================================================
# SETUP LOGROTATE
#=================================================