mirror of
https://github.com/YunoHost-Apps/aeneria_ynh.git
synced 2024-09-03 18:06:15 +02:00
Readd change_url script
This commit is contained in:
parent
f8d933e0fa
commit
b7e491b04a
3 changed files with 74 additions and 35 deletions
39
scripts/change_url
Normal file
39
scripts/change_url
Normal file
|
@ -0,0 +1,39 @@
|
|||
#!/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
|
||||
|
||||
#=================================================
|
||||
# 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
|
Loading…
Add table
Reference in a new issue