diff --git a/conf/nginx.conf b/conf/nginx.conf index 8629a9c..4b6cdf9 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { proxy_pass http://127.0.0.1:__PORT__; proxy_http_version 1.1; diff --git a/conf/systemd.service b/conf/systemd.service index 03b98c7..94ad361 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Hat.sh: Encrypt and Decrypt files securely +Description=Hat.sh: encrypt and decrypt files securely After=network.target [Service] diff --git a/manifest.toml b/manifest.toml index 3317a1d..042c8e5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://hat.sh/about/" code = "https://github.com/sh-dv/hat.sh" [integration] -yunohost = ">= 11.1.19" +yunohost = ">= 11.2" architectures = "all" multi_instance = false ldap = false diff --git a/scripts/install b/scripts/install index a58b646..c6b81ab 100755 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,7 @@ env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config -yunohost service add $app --description="Encrypt and Decrypt files securely" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Encrypt and decrypt files securely" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index a2b42dd..a3b9edd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,15 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -39,20 +30,12 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=10 # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Encrypt and Decrypt files securely" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Encrypt and decrypt files securely" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -61,13 +44,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=3 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX AND PHP-FPM -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 20ab2e0..b4142f4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,29 +47,14 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=10 - # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 - env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Encrypt and Decrypt files securely" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Encrypt and decrypt files securely" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE