diff --git a/scripts/install b/scripts/install index 63ae080..ccf73b6 100755 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,6 @@ path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC phpversion=$YNH_APP_ARG_PHPVERSION - ### If it's 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"...) @@ -78,17 +77,13 @@ ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion # INSTALL DEPENDENCIES #================================================= -if [ $phpversion != "none" ] -then ynh_script_progression --message="Installing dependencies..." --weight=2 ynh_install_app_dependencies "php${phpversion}-fpm" -fi #================================================= # STANDARD MODIFICATIONS #================================================= - #================================================= # CREATE DEDICATED USER #================================================= @@ -150,42 +145,7 @@ ynh_script_progression --message="Configuring PHP-FPM..." --time --weight=1 ynh_add_fpm_config --usage=low --footprint=low --phpversion=$phpversion #================================================= -# SPECIFIC SETUP -#================================================= -# ... -#================================================= - -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --time --weight=1 - -### Use these lines if you need to create a directory to store "persistent files" for the application. -### Usually this directory is used to store uploaded files or any file that won't be updated during -### an upgrade and that won't be deleted during app removal unless "--purge" option is used. -### If you're not using these lines: -### - Remove the section "BACKUP THE DATA DIR" in the backup script -### - Remove the section "RESTORE THE DATA DIRECTORY" in the restore script -### - As well as the section "REMOVE DATA DIR" in the remove script - -datadir=/home/yunohost.app/$app -ynh_app_setting_set --app=$app --key=datadir --value=$datadir - -mkdir -p $datadir - -# FIXME: this should be managed by the core in the future -# Here, as a packager, you may have to tweak the ownerhsip/permissions -# such that the appropriate users (e.g. maybe www-data) can access -# files in some cases. -# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - -# this will be treated as a security issue. -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" - - -#================================================= -# SETUP APPLICATION WITH CURL +# SETUP APPLICATION WITH CURL >>> to be removed #================================================= ### Use these lines only if the app installation needs to be finalized through @@ -194,16 +154,16 @@ chown -R $app:www-data "$datadir" ### forms. # Set the app as temporarily public for curl call -ynh_script_progression --message="Configuring SSOwat..." --time --weight=1 +# ynh_script_progression --message="Configuring SSOwat..." --time --weight=1 # Making the app public for curl -ynh_permission_update --permission="main" --add="visitors" +# ynh_permission_update --permission="main" --add="visitors" # Installation with curl -ynh_script_progression --message="Finalizing installation..." --time --weight=1 -ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3" +# ynh_script_progression --message="Finalizing installation..." --time --weight=1 +# ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3" # Remove the public access -ynh_permission_update --permission="main" --remove="visitors" +# ynh_permission_update --permission="main" --remove="visitors" #================================================= # GENERIC FINALIZATION