diff --git a/doc/PRE_UPGRADE.d/2.md b/doc/PRE_UPGRADE.d/2.md new file mode 100644 index 0000000..dbc0ae5 --- /dev/null +++ b/doc/PRE_UPGRADE.d/2.md @@ -0,0 +1,6 @@ +Since version 2, æneria must be installed under its own domain. + +If æneria is currently installed under a path, before upgrading, change æneria URL: + +* delete the path +* switch to a new dedicated domain (if needed) \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index bb38549..fe29b01 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,16 +14,14 @@ license = "AGPL-3.0-or-later" website = "https://aeneria.com" admindoc = "https://docs.aeneria.com" code = "https://gitlab.com/aeneria/aeneria-app" +demo = "https://demo.aeneria.com" [integration] yunohost = ">= 11.2" architectures = "all" multi_instance = true - ldap = true - sso = true - disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -32,10 +30,6 @@ ram.runtime = "50M" [install.domain] type = "domain" - [install.path] - type = "path" - default = "/aeneria" - [install.admin] type = "user" diff --git a/scripts/_common.sh b/scripts/_common.sh index b867d23..2ad9093 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -17,10 +17,10 @@ # hour: random value between 0 and 2 # These two variables are used in conf/aeneria.cron so that it runs every 3 hours starting at 00:MM, 01:MM, or 02:MM. generate_random_minutes_hour () { - minutes="$(ynh_string_random --length=1 --filter=0-5)$(ynh_string_random --length=1 --filter=0-9)" - hour="$(ynh_string_random --length=1 --filter=0-2)" - ynh_app_setting_set --app=$app --key=minutes --value=$minutes - ynh_app_setting_set --app=$app --key=hour --value=$hour + minutes="$(ynh_string_random --length=1 --filter=0-5)$(ynh_string_random --length=1 --filter=0-9)" + hour="$(ynh_string_random --length=1 --filter=0-2)" + ynh_app_setting_set --app=$app --key=minutes --value=$minutes + ynh_app_setting_set --app=$app --key=hour --value=$hour } #================================================= diff --git a/scripts/change_url b/scripts/change_url deleted file mode 100644 index d50c1a8..0000000 --- a/scripts/change_url +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source _common.sh -source /usr/share/yunohost/helpers - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# MODIFY URL IN NGINX CONF -#================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=3 - -ynh_change_url_nginx_config - -#================================================= -# END OF SCRIPT -#================================================= - -ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 0b59468..becada4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,6 +28,16 @@ if [ -z "${minutes:-}" ] || [ -z "${hour:-}" ]; then generate_random_minutes_hour fi +# Before version 2.x æneria could be installed under a path, +# this functionnality has been deprecated since version 2.0.0 and æneria +# now need to be installed under its own domain. +# If the app is currently installed under a path, we warn the admin +# that he should move the app under its own domain +if [[ -z "$path" ]]; then + ynh_die --message="Since version 2.0.0, $app need to be installed under its own domain. \ + Before upgrading, change $app URL: delete the path and switch to a new domain if needed." +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================