1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zeronet_ynh.git synced 2024-09-03 17:46:12 +02:00
zeronet_ynh/scripts/change_url

49 lines
1.7 KiB
Text
Raw Permalink Normal View History

2020-11-09 13:27:06 +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..."
2021-05-23 09:48:04 +02:00
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ui.UiServer Web interface" --timeout=120
2020-11-09 13:27:06 +01:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2020-11-26 11:35:22 +01:00
ynh_script_progression --message="Updating NGINX web server configuration..."
2020-11-09 13:27:06 +01:00
2023-12-13 16:28:15 +01:00
ynh_change_url_nginx_config
2020-11-09 13:27:06 +01:00
#=================================================
# GENERIC FINALISATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
2020-11-26 11:29:29 +01:00
ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" --target_file="/etc/systemd/system/${app}.service"
2024-01-19 17:41:44 +01:00
systemctl daemon-reload
2020-11-09 13:27:06 +01:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
2024-01-19 17:41:44 +01:00
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Ui.UiServer Web interface" --timeout=120
2020-11-09 13:27:06 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2020-11-26 11:32:52 +01:00
ynh_script_progression --message="Change of URL completed for $app"