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

40 lines
1.4 KiB
Text
Raw Permalink Normal View History

2017-12-05 19:32:16 +01:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2022-10-20 00:14:07 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
2017-12-05 19:32:16 +01:00
2024-01-16 21:35:46 +01:00
ynh_change_url_nginx_config
2017-12-05 19:32:16 +01:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
2024-01-16 21:35:46 +01:00
ynh_script_progression --message="Updating configuration files..." --weight=1
2017-12-05 19:32:16 +01:00
2024-01-16 21:35:46 +01:00
ynh_replace_string --match_string="https://$old_domain$old_path" --replace_string="https://$domain$path" --target_file="/etc/cron.d/$app"
2017-12-05 19:32:16 +01:00
#=================================================
# UPDATE THE DATABASE
#=================================================
2022-10-20 00:14:07 +02:00
ynh_script_progression --message="Updating the database..." --weight=1
2017-12-05 19:32:16 +01:00
2024-01-16 21:35:46 +01:00
ynh_mysql_execute_as_root --database="$app" --sql="UPDATE leed_configuration SET value='$domain$path/' WHERE value LIKE '%${old_domain}%'"
2019-01-30 16:15:24 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2019-03-12 20:09:45 +01:00
ynh_script_progression --message="Change of URL completed for $app" --last