From 937377f3552abc2e0ac2acabadf59facd3884693 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 13 Apr 2019 17:17:35 +0200 Subject: [PATCH] amanage settings --- scripts/install | 2 ++ scripts/remove | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 504093c..455dda6 100644 --- a/scripts/install +++ b/scripts/install @@ -58,6 +58,8 @@ ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path ynh_app_setting_set $app user $user ynh_app_setting_set $app channel $channel +ynh_app_setting_set $app synchome $SYNCHOME +ynh_app_setting_set $app syncuser $SYNCUSER #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/remove b/scripts/remove index 19f0652..ca51c65 100644 --- a/scripts/remove +++ b/scripts/remove @@ -9,12 +9,22 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# LOAD SETTINGS +#================================================= +ynh_print_info "Loading installation settings..." + +app=$YNH_APP_INSTANCE_NAME + +domain=$(ynh_app_setting_get $app domain) + +SYNCHOME=$(ynh_app_setting_get $app synchome) +SYNCUSER=$(ynh_app_setting_get $app syncuser) +SYNCPORT=$(ynh_app_setting_get $app syncport) +GUIPORT=$(ynh_app_setting_get $app guiport) + +final_path=$(ynh_app_setting_get $app final_path) -# Configurable variables -SYNCHOME="/home/yunohost.app/syncthing" -SYNCUSER=debian-syncthing -SYNCPORT=22000 -GUIPORT=8384 # Stop and remove syncthing service sudo systemctl stop syncthing@$SYNCUSER.service