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

51 lines
1.9 KiB
Text
Raw Normal View History

2022-11-23 10:08:54 +01:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop" --log_path="/var/log/uwsgi/$app/$app.log"
2022-11-23 10:08:54 +01:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_change_url_nginx_config
2022-11-23 10:08:54 +01:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
2023-03-01 20:34:38 +01:00
# RECONFIGURING SEARXNG
2022-11-23 10:08:54 +01:00
#=================================================
2023-03-01 20:34:38 +01:00
ynh_script_progression --message="Reconfiguring SearXNG..." --weight=2
2023-09-27 22:15:02 +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/settings.yml"
2022-11-23 10:08:54 +01:00
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="start" --log_path="/var/log/uwsgi/$app/$app.log"
2022-11-23 10:08:54 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last