From 7b3101ad4c76f3093d40890e897522a871892c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 13 Apr 2024 22:20:47 +0200 Subject: [PATCH] cleaning --- conf/nginx.conf | 1 + manifest.toml | 4 ++-- scripts/install | 2 +- scripts/upgrade | 21 ++++++--------------- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4939bf4..211b4cd 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,6 +6,7 @@ location __PATH__/ { proxy_pass http://127.0.0.1:__PORT__; + proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/manifest.toml b/manifest.toml index 6d2fd4c..248c4d6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -50,8 +50,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://framagit.org/fiat-tux/hat-softwares/lstu/-/archive/0.28-0/lstu-0.28-0.tar.bz2" - sha256 = "8e7e818540ade44c7ed410b0ee25a0091b2cf56bc04bdaccdeb4e5c354635546" + url = "https://framagit.org/fiat-tux/hat-softwares/lstu/-/archive/0.28-0/lstu-0.28-0.tar.gz" + sha256 = "bb6531dbbc67800b818147fa0758b3581f4a8bf0267537f4ba598334c0c7ab3b" autoupdate.strategy = "latest_gitlab_release" [resources.ports] diff --git a/scripts/install b/scripts/install index 075417f..b720dc3 100644 --- a/scripts/install +++ b/scripts/install @@ -58,7 +58,7 @@ yunohost service add $app --log="/var/log/$app.log" --log="/var/www/$app/log/pro #================================================= ynh_script_progression --message="Adding a configuration file..." -ynh_add_config --template="../conf/lstu.conf.ldap" --destination="$install_dir/lstu.conf" +ynh_add_config --template="lstu.conf.ldap" --destination="$install_dir/lstu.conf" #================================================= # INSTALL LSTU diff --git a/scripts/upgrade b/scripts/upgrade index 0af045f..f84f38a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -27,14 +21,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="lstu.conf" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep="lstu.conf" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -46,14 +36,15 @@ chown -R $app:www-data "$install_dir" #================================================= #ynh_script_progression --message="Updating a configuration file..." -#ynh_add_config --template="../conf/lstu.conf.ldap" --destination="$install_dir/lstu.conf" +#ynh_add_config --template="lstu.conf.ldap" --destination="$install_dir/lstu.conf" #================================================= # BUILD LSU #================================================= -ynh_script_progression --message="Building lstu..." +ynh_script_progression --message="Building $app..." pushd $install_dir + ynh_secure_remove --file="$install_dir/local" carton install --deployment --without=sqlite --without=mysql popd