1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hat_ynh.git synced 2024-09-03 19:16:04 +02:00
This commit is contained in:
Éric Gaspar 2023-08-18 11:19:59 +02:00
parent 66fcc14558
commit 322b9a6529
6 changed files with 8 additions and 46 deletions

View file

@ -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;

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -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
#=================================================

View file

@ -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