From 6060aa6be92f765232e0e3acd3e6e2f3988da5db Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 4 Feb 2022 09:04:28 +0100 Subject: [PATCH] Fix --- scripts/backup | 6 ++++++ scripts/restore | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index bdb4027..80984b3 100644 --- a/scripts/backup +++ b/scripts/backup @@ -37,6 +37,12 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# BACKUP THE CONFIGURATION FILE +#================================================= + +ynh_backup --src_path="/etc/kiwiirc" + #================================================= # BACKUP SYSTEMD #================================================= diff --git a/scripts/restore b/scripts/restore index 14be590..f3f2465 100644 --- a/scripts/restore +++ b/scripts/restore @@ -36,6 +36,22 @@ ynh_script_progression --message="Restoring the NGINX configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Setting up source files..." --weight=2 + +tempdir="$(mktemp -d)" +ynh_setup_source --dest_dir=$tempdir --source_id=app +ynh_exec_warn_less dpkg -i $tempdir/kiwiirc_20.05.24.1-1_amd64.deb + +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX configuration..." + +ynh_restore_file --origin_path="/etc/kiwiirc" + #================================================= # RESTORE SYSTEMD #================================================= @@ -56,7 +72,7 @@ yunohost service add $app --description="Versatile web based messenger using IRC #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" +ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd" #================================================= # RELOAD NGINX