1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searx_ynh.git synced 2024-09-03 20:16:30 +02:00
searx_ynh/scripts/change_url

52 lines
1.9 KiB
Text
Raw Normal View History

2019-05-18 19:08:34 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
2022-03-06 19:01:21 +01:00
ynh_script_progression --message="Stopping a systemd service..." --weight=10
2019-05-18 19:08:34 +02:00
ynh_systemd_action --service_name=uwsgi --action=stop
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2020-09-19 16:09:37 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
2019-05-18 19:08:34 +02:00
2023-08-18 11:38:35 +02:00
ynh_change_url_nginx_config
2019-05-18 19:08:34 +02:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# RECONFIGURING SEARX
#=================================================
2020-12-19 23:34:40 +01:00
ynh_script_progression --message="Reconfiguring Searx..." --weight=2
2019-05-18 19:08:34 +02:00
2023-08-18 11:38:35 +02:00
#ynh_replace_string --match_string="base_url : https://${old_domain}${old_path%/}/" --replace_string="base_url : https://${new_domain}${new_path%/}/" --target_file="$install_dir/searx/settings.yml"
2019-05-18 19:08:34 +02:00
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
2022-03-06 19:01:21 +01:00
ynh_script_progression --message="Starting a systemd service..." --weight=2
2019-05-18 19:08:34 +02:00
2022-03-06 19:01:21 +01:00
# Start a systemd service
2020-04-10 22:02:55 +02:00
ynh_systemd_action --service_name=uwsgi-app@$app.service --action=restart --line_match="spawned uWSGI master process" --log_path="/var/log/uwsgi/$app/$app.log"
2019-05-18 19:08:34 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2022-03-06 19:01:21 +01:00
ynh_script_progression --message="Change of URL completed for $app" --last