diff --git a/check_process b/check_process index 9b54344..9f03b3e 100644 --- a/check_process +++ b/check_process @@ -9,7 +9,7 @@ setup_sub_dir=0 setup_root=1 setup_nourl=0 - setup_private=0 + setup_private=1 setup_public=1 upgrade=1 backup_restore=1 diff --git a/manifest.json b/manifest.json index a3a30fa..d94a727 100644 --- a/manifest.json +++ b/manifest.json @@ -34,7 +34,6 @@ "example": "/scratch", "default": "/scratch" }, - { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index b2b4bfe..73e3146 100644 --- a/scripts/install +++ b/scripts/install @@ -52,35 +52,34 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url #================================================= -# FIND AND OPEN A PORT +# CREATE DEDICATED USER #================================================= +ynh_script_progression --message="Configuring system user..." --weight=1 -# Find a free port -port=$(ynh_find_port 80) -ynh_app_setting_set --app=$app --key=port --value=$port +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Setting up source files..." --weight=1 -ynh_app_setting_set $app final_path $final_path +ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source "$final_path" +ynh_setup_source --dest_dir="$final_path" + +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= - -# Create a system user -ynh_system_user_create $app - #================================================= # SETUP SSOWAT #=================================================