diff --git a/scripts/_common.sh b/scripts/_common.sh index eb8de61..6366b74 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,11 +1,15 @@ #!/bin/bash #================================================= -# COMMON VARIABLES +# COMMON FUCTIONS #================================================= -#================================================= -# EXPERIMENTAL HELPERS +# Define a function to execute commands with `occ` +exec_occ() { + (cd "$install_dir" && ynh_exec_as "$app" \ + php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") +} + #================================================= # Define a function to add an external storage @@ -20,6 +24,8 @@ local mount_id=$(exec_occ files_external:create --output=json \ || exec_occ files_external:option "$mount_id" enable_sharing true } +#================================================= +# EXPERIMENTAL HELPERS #================================================= # Check if an URL is already handled diff --git a/scripts/install b/scripts/install index f0673b1..82d8345 100755 --- a/scripts/install +++ b/scripts/install @@ -79,12 +79,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Installing $app..." --weight=30 -# Define a function to execute commands with `occ` -exec_occ() { - (cd "$install_dir" && ynh_exec_as "$app" \ - php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") -} - # Set write access for the following commands chown -R $app: "$install_dir" "$data_dir"