From 7295ac32eb07e4b1d8641b0128dc03178ae4a4c1 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 11 Feb 2017 19:54:05 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5244b21..135f61c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,5 +1,8 @@ #!/bin/bash +# Source app helpers +source /usr/share/yunohost/helpers + source ./_common set -eu app=$YNH_APP_INSTANCE_NAME @@ -8,9 +11,6 @@ domain=$(ynh_app_setting_set $app domain) path=$(ynh_app_setting_set $app path) is_public=$(ynh_app_setting_set $app is_public) -# Source app helpers -source /usr/share/yunohost/helpers - # Remove trailing "/" for next commands if [[ ! "$path" == "/" ]]; then path=${path%/} @@ -25,7 +25,6 @@ sudo mkdir -p $final_path sudo rm -rf $final_path/* # Copy files to the right place -extract_source $final_path # Files owned by root, www-data can just read sudo chown www-data:www-data $final_path -R @@ -39,11 +38,12 @@ sudo cp ../conf/nginx.conf $nginxconf sudo chown root: $nginxconf sudo chmod 600 $nginxconf +ynh_app_setting_set "$app" is_public "$is_public" if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set $app skipped_uris -d - ynh_app_setting_set $app unprotected_uris "/" + ynh_app_setting_set "$app" unprotected_uris "/" fi sudo service nginx reload sudo yunohost app ssowatconf +