From 9ae5cfbe576bf7a8d0c50e613b57e1ce4c210cc3 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sun, 29 Jan 2017 16:32:14 +0100 Subject: [PATCH] Update restore --- scripts/restore | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/restore b/scripts/restore index 0149d34..09109a9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,10 +1,10 @@ #!/bin/bash # causes the shell to exit if any subcommand or pipeline returns a non-zero status -set -e +set -eu -# Source YNH helpers -. /usr/share/yunohost/helpers +# Source app helpers +source /usr/share/yunohost/helpers # This is a multi-instance app, meaning it can be installed several times independently # The id of the app as stated in the manifest is available as $YNH_APP_ID @@ -19,13 +19,13 @@ set -e app=$YNH_APP_INSTANCE_NAME # Retrieve arguments -domain=$(sudo yunohost app setting $app domain) +domain=$(sudo ynh_app_setting_set $app domain) # Get old parameter of the app -domain=$(sudo yunohost app setting $app domain) -path=$(sudo yunohost app setting $app path) -user=$(sudo yunohost app setting $app allowed_users) -is_public=$(sudo yunohost app setting $app is_public) +domain=$(sudo ynh_app_setting_set $app domain) +path=$(sudo ynh_app_setting_set $app path) +user=$(sudo ynh_app_setting_set $app allowed_users) +is_public=$(sudo ynh_app_setting_set $app is_public) # Check domain/path availability sudo yunohost app checkurl $domain$path -a $app @@ -62,5 +62,5 @@ sudo service nginx reload # Set ssowat config if [ "$is_public" = "Yes" ]; then - sudo yunohost app setting $app unprotected_uris -v "/" + sudo ynh_app_setting_set $app unprotected_uris "/" fi