From d76f10cc115364a54898a4d9b199f1489503c098 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Tue, 7 Mar 2017 23:17:18 +0100 Subject: [PATCH] don't use sudo before calling helpers --- scripts/upgrade | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index de2ccb8..3566fb7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,6 +3,9 @@ # causes the shell to exit if any subcommand or pipeline returns a non-zero status set -e +# 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 # The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...) @@ -16,10 +19,10 @@ set -e app=$YNH_APP_INSTANCE_NAME # Retrieve app settings -domain=$(sudo ynh_app_setting_get $app domain) -path=$(sudo ynh_app_setting_get $app path) -admin=$(sudo ynh_app_setting_get $app admin) -is_public=$(sudo ynh_app_setting_get $app is_public) +domain=$(ynh_app_setting_get $app domain) +path=$(ynh_app_setting_get $app path) +admin=$(ynh_app_setting_get $app admin) +is_public=$(ynh_app_setting_get $app is_public) # Remove trailing slash to path path=${path%/}