2020-11-26 18:47:34 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2024-01-13 19:12:46 +01:00
|
|
|
#=================================================
|
|
|
|
# ENSURE DOWNWARD COMPATIBILITY
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# 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 [ "$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
|
|
|
|
|
2020-11-26 18:47:34 +01:00
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2021-03-17 21:23:02 +01:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=3
|
2020-11-26 18:47:34 +01:00
|
|
|
|
2023-10-28 15:01:13 +02:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2020-11-26 18:47:34 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-01-13 19:12:46 +01:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|