From 7c14999e174b6470218039446bcaef805ae115ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 1 Feb 2024 16:38:54 +0100 Subject: [PATCH] Restore files before restoring system config --- scripts/restore | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/restore b/scripts/restore index 94d75f4..59bb2eb 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,25 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# RESTORE SYSTEM CONFIGURATIONS -#================================================= -ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 - -ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -ynh_restore_file --origin_path="/etc/systemd/system/$app.socket" -systemctl enable "$app.service" --quiet - -yunohost service add "$app" --log="/var/log/$app/$app.log" - -ynh_restore_file --origin_path="/etc/dnsmasq.d/lxd" -systemctl restart dnsmasq - -ynh_restore_file --origin_path="/etc/ld.so.conf.d/$app.conf" -ldconfig - -_ynh_set_subuid_subgid - #================================================= # RESTORE VARIOUS FILES #================================================= @@ -48,6 +29,25 @@ ynh_restore_file --origin_path="/usr/local/bin/lxd-migrate" ynh_restore_file --origin_path="/usr/local/bin/lxd-user" ynh_restore_file --origin_path="/etc/bash_completion.d/lxd-client" +#================================================= +# RESTORE SYSTEM CONFIGURATIONS +#================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +ynh_restore_file --origin_path="/etc/systemd/system/$app.socket" +systemctl enable "$app.service" --quiet + +yunohost service add "$app" --log="/var/log/$app/$app.log" + +ynh_restore_file --origin_path="/etc/dnsmasq.d/lxd" +systemctl restart dnsmasq + +ynh_restore_file --origin_path="/etc/ld.so.conf.d/$app.conf" +ldconfig + +_ynh_set_subuid_subgid + #================================================= # START SYSTEMD SERVICE #=================================================