2021-08-13 15:48:24 +03:00
|
|
|
#!/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=2
|
|
|
|
|
2023-03-29 20:23:48 +03:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2021-08-13 15:48:24 +03:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
2022-06-01 05:16:19 +03:00
|
|
|
# UPDATE A CONFIG FILE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
2021-08-13 15:48:24 +03:00
|
|
|
|
2023-03-29 20:30:41 +03:00
|
|
|
domain=$new_domain
|
2023-03-29 20:23:48 +03:00
|
|
|
ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php"
|
2021-08-13 15:48:24 +03:00
|
|
|
|
2023-03-29 20:23:48 +03:00
|
|
|
chmod 400 "$install_dir/config.php"
|
|
|
|
chown $app:$app "$install_dir/config.php"
|
2021-08-13 15:48:24 +03:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|