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