From f4573dbf3a1eb6eb448699e3aa0618b1d9cc5147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:54:40 +0200 Subject: [PATCH] fix --- conf/.env | 2 +- scripts/upgrade | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/conf/.env b/conf/.env index 5bb65b8..3be25ab 100644 --- a/conf/.env +++ b/conf/.env @@ -1,6 +1,6 @@ TZ=__TIMEZONE__ OCIS_URL=https://__DOMAIN__ -OCIS_PUBLIC_URL=https://__DOMAIN__ +#OCIS_PUBLIC_URL=https://__DOMAIN__ PROXY_HTTP_ADDR=127.0.0.1:__PORT__ PROXY_TLS=true OCIS_INSECURE=false diff --git a/scripts/upgrade b/scripts/upgrade index 900e77a..2cd3f72 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,15 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +if [[ -f "$install_dir/ocis.yaml" ]]; then + mv "$install_dir/ocis.yaml" "$data_dir/config/ocis.yaml" +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -48,12 +57,12 @@ yunohost service add $app --description="File sharing platform" --log="/var/log/ #================================================= # ADD A CONFIGURATION #================================================= -#ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 -#ynh_add_config --template=".env" --destination="$install_dir/ocis.env" +ynh_add_config --template=".env" --destination="$install_dir/ocis.env" -#chmod 400 "$install_dir/ocis.env" -#chown $app:$app "$install_dir/ocis.env" +chmod 400 "$install_dir/ocis.env" +chown $app:$app "$install_dir/ocis.env" #================================================= # START SYSTEMD SERVICE