2018-06-17 00:50:26 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
2020-06-11 00:45:03 +02:00
|
|
|
# LOAD SETTINGS
|
2018-06-17 00:50:26 +02:00
|
|
|
#=================================================
|
2022-05-04 10:04:38 +02:00
|
|
|
|
|
|
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
|
|
|
timezone="$(cat /etc/timezone)"
|
2018-06-17 00:50:26 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2020-11-29 09:59:46 +01:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..."
|
2018-06-17 00:50:26 +02:00
|
|
|
|
2023-03-13 09:45:53 +01:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2022-05-04 10:04:38 +02:00
|
|
|
#=================================================
|
|
|
|
# MODIFY A CONFIG FILE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Modifying a config file..."
|
2023-03-13 09:52:15 +01:00
|
|
|
|
2022-05-04 10:04:38 +02:00
|
|
|
domain="$new_domain"
|
|
|
|
path="$new_path"
|
|
|
|
|
2023-03-13 09:45:53 +01:00
|
|
|
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
|
|
|
|
chmod 400 "$install_dir/.env"
|
|
|
|
chown $app "$install_dir/.env"
|
2022-05-04 10:04:38 +02:00
|
|
|
|
2019-06-23 01:22:06 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2018-06-17 00:50:26 +02:00
|
|
|
|
2022-07-19 02:18:21 +02:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app"
|