From 29dc9c6c2cd643f487dea4ade74b4c2224c56b67 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 4 Feb 2022 09:49:47 +0100 Subject: [PATCH] Fix --- scripts/backup | 2 ++ scripts/install | 2 +- scripts/remove | 3 +++ scripts/restore | 4 +++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/backup b/scripts/backup index d04dac1..e3ef7e8 100644 --- a/scripts/backup +++ b/scripts/backup @@ -43,6 +43,8 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/kiwiirc" +ynh_backup --file="/var/log/$app.log" + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 39adbcf..489f595 100644 --- a/scripts/install +++ b/scripts/install @@ -85,7 +85,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Versatile web based messenger using IRC" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Versatile web based messenger using IRC" --log="/var/log/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/remove b/scripts/remove index 673fe7f..873bdbf 100644 --- a/scripts/remove +++ b/scripts/remove @@ -54,6 +54,9 @@ ynh_script_progression --message="Removing various files..." --weight=1 # Remove a cron file ynh_secure_remove --file="/etc/$app" +# Remove the log files +ynh_secure_remove --file="/var/log/$app.log" + #================================================= # REMOVE NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 2cf32f2..270af5a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -45,10 +45,12 @@ ynh_exec_warn_less dpkg -i $tempdir/kiwiirc.deb #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." +ynh_script_progression --message="Restoring various file..." --weight=1 ynh_restore_file --origin_path="/etc/kiwiirc" +ynh_restore_file --origin_path="/var/log/$app.log" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #=================================================