1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dokuwiki_ynh.git synced 2024-09-03 18:26:20 +02:00

don't use sudo before calling helpers

This commit is contained in:
magikcypress 2017-03-07 23:17:18 +01:00
parent bebfd37c3e
commit d76f10cc11

View file

@ -3,6 +3,9 @@
# causes the shell to exit if any subcommand or pipeline returns a non-zero status # causes the shell to exit if any subcommand or pipeline returns a non-zero status
set -e set -e
# Source app helpers
source /usr/share/yunohost/helpers
# This is a multi-instance app, meaning it can be installed several times independently # 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 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", ...) # The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
@ -16,10 +19,10 @@ set -e
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings # Retrieve app settings
domain=$(sudo ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
path=$(sudo ynh_app_setting_get $app path) path=$(ynh_app_setting_get $app path)
admin=$(sudo ynh_app_setting_get $app admin) admin=$(ynh_app_setting_get $app admin)
is_public=$(sudo ynh_app_setting_get $app is_public) is_public=$(ynh_app_setting_get $app is_public)
# Remove trailing slash to path # Remove trailing slash to path
path=${path%/} path=${path%/}