1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpservermon_ynh.git synced 2024-09-03 19:56:40 +02:00
phpservermon_ynh/scripts/change_url

36 lines
1.2 KiB
Text
Raw Normal View History

2021-01-12 18:39:03 +01:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2021-01-20 00:14:00 +01:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
2021-01-12 18:39:03 +01:00
2024-01-16 21:51:49 +01:00
ynh_change_url_nginx_config
2021-01-12 18:39:03 +01:00
2021-02-01 11:52:03 +01:00
#=================================================
# Update Config file
#=================================================
2021-07-17 12:00:15 +02:00
2024-01-16 21:51:49 +01:00
if [ "$change_path" -eq 1 ]; then
# Update config file
ynh_replace_string --match_string="'PSM_BASE_URL', '.*'" --replace_string="'PSM_BASE_URL', '$path'" --target_file="$install_dir/config.php"
#replace checksum
ynh_delete_file_checksum --file="$install_dir/config.php"
ynh_store_file_checksum --file="$install_dir/config.php"
2021-02-01 11:52:03 +01:00
fi
2021-01-12 18:39:03 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2021-07-17 12:00:15 +02:00
ynh_script_progression --message="Change of URL completed for $app" --last