From ce85ee0451ca3b26abcb5819552ec11f678df85e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 9 Sep 2021 18:07:07 +0200 Subject: [PATCH] Proper backup/restore of config_file_path --- scripts/backup | 3 +++ scripts/restore | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 6c7b085..496e228 100644 --- a/scripts/backup +++ b/scripts/backup @@ -66,6 +66,9 @@ ynh_backup --src_path="/etc/sudoers.d/${app}_ynh" # Backup the wireguard interface config ynh_backup --src_path="/etc/wireguard" +# Backing up specific config file, in case of it is not in /etc/wireguard +ynh_backup --src_path="$(jq -r ".config_file_path" $final_path/db/server/global_settings.json)" --not_mandatory + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 51bd50a..3d53d5c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -133,7 +133,7 @@ yunohost service add wireguard_ui --description "WireGuard UI" # RESTORE VARIOUS FILES #================================================= -ynh_restore_file --origin_path=$(jq -r ".config_file_path" $final_path/db/server/global_settings.json) +ynh_restore_file --origin_path=$(jq -r ".config_file_path" $final_path/db/server/global_settings.json) --not_mandatory #================================================= # START SYSTEMD SERVICE