1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/h5ai_ynh.git synced 2024-09-03 20:36:25 +02:00
This commit is contained in:
ericgaspar 2020-12-02 12:13:13 +01:00
parent 5b0905a3d4
commit 95f1d87cde
No known key found for this signature in database
GPG key ID: 574F281483054D44
7 changed files with 50 additions and 20 deletions

View file

@ -19,8 +19,6 @@
incorrect_path=1 incorrect_path=1
port_already_use=0 port_already_use=0
change_url=0 change_url=0
;;; Levels
Level 5=auto
;;; Options ;;; Options
Email=alex.aubin@mailoo.org Email=alex.aubin@mailoo.org
Notification=down Notification=down

View file

@ -3,4 +3,4 @@ SOURCE_SUM=612acd8cc724ab42c5266f7b9966a0212b561331d8770b5609891edb5cb69a8b
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=h5ai-0.29.2.zip SOURCE_FILENAME=h5ai-0.29.2.zip

View file

@ -1,10 +1,10 @@
{ {
"name": "H5AI", "name": "h5ai",
"id": "h5ai", "id": "h5ai",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "A modern HTTP web server index for NGINX.", "en": "Modern HTTP web server index for NGINX.",
"fr": "Un serveur moderne d'index pour NGINX." "fr": "Serveur moderne d'index pour NGINX."
}, },
"version": "0.29.2~ynh2", "version": "0.29.2~ynh2",
"url": "https://larsjung.de/h5ai/", "url": "https://larsjung.de/h5ai/",
@ -14,7 +14,7 @@
"email": "alex.aubin@mailoo.org" "email": "alex.aubin@mailoo.org"
}, },
"requirements": { "requirements": {
"yunohost": ">= 3.7.0" "yunohost": ">= 3.8.1"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [
@ -53,4 +53,4 @@
} }
] ]
} }
} }

View file

@ -60,15 +60,6 @@ ynh_script_progression --message="Setting up source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path" ynh_setup_source "$final_path"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Restore permissions on app files
chown -R www-data:www-data "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
@ -77,6 +68,23 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Restore permissions on app files
chown -R $app: "$final_path"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================

View file

@ -26,6 +26,14 @@ ynh_script_progression --message="Removing $app main directory..." --weight=3
# Remove sources # Remove sources
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
# Delete a system user
ynh_system_user_delete --username=$app
#================================================= #=================================================
# REMOVE THE NGINX CONFIGURATION # REMOVE THE NGINX CONFIGURATION
#================================================= #=================================================

View file

@ -51,12 +51,20 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
#================================================= #=================================================
# RESTORE USER RIGHTS # RESTORE USER RIGHTS
#================================================= #=================================================
# Restore permissions on app files # Restore permissions on app files
chown -R www-data:www-data "$final_path" chown -R $app: "$final_path"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -90,9 +90,17 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated nginx config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -100,7 +108,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# Set permissions on app files # Set permissions on app files
chown -R www-data:www-data "$final_path" chown -R $app: "$final_path"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX