1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/aeneria_ynh.git synced 2024-09-03 18:06:15 +02:00
aeneria_ynh/scripts/change_url

39 lines
1.4 KiB
Text
Raw Normal View History

2020-11-26 18:47:34 +01:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# 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
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last