mirror of
https://github.com/YunoHost-Apps/hat_ynh.git
synced 2024-09-03 19:16:04 +02:00
fix
This commit is contained in:
parent
66fcc14558
commit
322b9a6529
6 changed files with 8 additions and 46 deletions
|
@ -1,4 +1,5 @@
|
||||||
location / {
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
|
location __PATH__/ {
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Hat.sh: Encrypt and Decrypt files securely
|
Description=Hat.sh: encrypt and decrypt files securely
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
|
@ -17,7 +17,7 @@ admindoc = "https://hat.sh/about/"
|
||||||
code = "https://github.com/sh-dv/hat.sh"
|
code = "https://github.com/sh-dv/hat.sh"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.1.19"
|
yunohost = ">= 11.2"
|
||||||
architectures = "all"
|
architectures = "all"
|
||||||
multi_instance = false
|
multi_instance = false
|
||||||
ldap = false
|
ldap = false
|
||||||
|
|
|
@ -65,7 +65,7 @@ env_path="$PATH"
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_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
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -10,15 +10,6 @@
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
# RESTORE THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -39,20 +30,12 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=10
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
#=================================================
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
# RESTORE SYSTEMD
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||||
systemctl enable $app.service --quiet
|
systemctl enable $app.service --quiet
|
||||||
|
|
||||||
#=================================================
|
yunohost service add $app --description="Encrypt and decrypt files securely" --log="/var/log/$app/$app.log"
|
||||||
# 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"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# 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"
|
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
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -47,29 +47,14 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPGRADE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=10
|
|
||||||
|
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
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"
|
env_path="$PATH"
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
yunohost service add $app --description="Encrypt and decrypt files securely" --log="/var/log/$app/$app.log"
|
||||||
# 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"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
Loading…
Reference in a new issue