mirror of
https://github.com/YunoHost-Apps/aeneria_ynh.git
synced 2024-09-03 18:06:15 +02:00
Add upgrade warning: aeneria should be now install on a dedicated domain
This commit is contained in:
parent
ed3d213cad
commit
55db04dabe
5 changed files with 21 additions and 36 deletions
6
doc/PRE_UPGRADE.d/2.md
Normal file
6
doc/PRE_UPGRADE.d/2.md
Normal file
|
@ -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)
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue