From 68325f0dfda3e510f6cc1c212af6269b037c83d1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 9 Aug 2020 14:48:13 +0200 Subject: [PATCH] fix --- README.md | 1 - README_fr.md | 1 - check_process | 11 ++++++++--- conf/app.src | 4 ++-- conf/nginx.conf | 2 ++ scripts/_common.sh | 2 +- scripts/backup | 2 -- scripts/change_url | 14 +++++++------- scripts/install | 8 ++++---- scripts/remove | 6 +++--- scripts/restore | 3 +-- scripts/upgrade | 8 ++++---- 12 files changed, 32 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 97194e9..272f45c 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ How to configure this app: by an admin panel. * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/thelounge%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/thelounge/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/thelounge%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/thelounge/) -* Buster x86-64 - [![](https://ci-buster.nohost.me/ci/logs/thelounge%20%28Apps%29.svg)](https://ci-buster.nohost.me/ci/apps/thelounge/) ## Links diff --git a/README_fr.md b/README_fr.md index 10ea474..a615e49 100644 --- a/README_fr.md +++ b/README_fr.md @@ -41,7 +41,6 @@ Comment configurer cette application : via le panneau d’administration. * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/thelounge%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/thelounge/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/thelounge%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/thelounge/) -* Buster x86-64 - [![](https://ci-buster.nohost.me/ci/logs/thelounge%20%28Apps%29.svg)](https://ci-buster.nohost.me/ci/apps/thelounge/) ## Liens diff --git a/check_process b/check_process index 8f8325f..2ecf3e7 100644 --- a/check_process +++ b/check_process @@ -6,10 +6,10 @@ ;; Test complet ; Manifest domain="domain.tld" (DOMAIN) - path="/path" (PATH) - is_public=1 (PUBLIC|public=1|private=0) + path="/path" (PATH) + is_public=1 (PUBLIC|public=1|private=0) password="pass" - port="9000" (PORT) + port="9000" (PORT) ; Checks pkg_linter=1 setup_sub_dir=1 @@ -18,6 +18,7 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=CommitHash backup_restore=1 multi_instance=0 incorrect_path=0 @@ -29,3 +30,7 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=CommitHash + name=Name and date of the commit. + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/conf/app.src b/conf/app.src index ef47ff4..642a1b2 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/thelounge/thelounge/archive/v4.2.0-pre.1.tar.gz -SOURCE_SUM=be1c278a39ea23aea5e9846103e26bd03454bce8cb8e1422266fe047f31f3c7e +SOURCE_URL=https://github.com/thelounge/thelounge/archive/v4.2.0-pre.2.tar.gz +SOURCE_SUM=49b9adc0a96b7b4576c4b7361952544e267d77eeb6c4c7ed3f216a7ccfdb3caa SOURCE_SUM_PRG=sha256sum ARCH_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 68e1227..f8b2429 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,6 @@ +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location ^~ __PATH__/ { + proxy_pass http://127.0.0.1:__PORT__/; proxy_http_version 1.1; proxy_set_header Connection "upgrade"; diff --git a/scripts/_common.sh b/scripts/_common.sh index ff33779..b3656bc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # nodejs version -nodejs_version=12 +nodejs_version=14 #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index b3a8400..8640103 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -14,7 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -# Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= diff --git a/scripts/change_url b/scripts/change_url index fd495ad..6375a95 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -58,23 +58,23 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." +ynh_script_progression --message="Updating NGINX web server configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -97,7 +97,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index 225b1e0..8c6705d 100644 --- a/scripts/install +++ b/scripts/install @@ -77,16 +77,16 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st #================================================= ynh_script_progression --message="Setting up source files..." -ynh_app_setting_set --app=$app --key=final_path --value=$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 --dest_dir=$final_path #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." +ynh_script_progression --message="Configuring NGINX web server..." -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -173,7 +173,7 @@ ynh_script_progression --message="Configuring SSOwat..." #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 75eb175..a09d08f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -53,7 +53,7 @@ ynh_remove_nodejs #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." +ynh_script_progression --message="Removing $app main directory..." # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -61,9 +61,9 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index 848d85b..a242ca5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -122,7 +121,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index ea6f882..b8426c0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,7 +59,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." +ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -104,9 +104,9 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -206,7 +206,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload