2023-12-13 21:25:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-06-23 21:23:05 +02:00
|
|
|
ynh_script_progression "Stopping $app's systemd service..."
|
2023-12-13 21:25:13 +01:00
|
|
|
|
2024-06-23 21:23:05 +02:00
|
|
|
ynh_systemctl --service=$app --action="stop" --log_path="systemd"
|
2023-12-13 21:25:13 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2024-06-23 21:23:05 +02:00
|
|
|
ynh_script_progression "Updating NGINX web server configuration..."
|
2023-12-13 21:25:13 +01:00
|
|
|
|
2024-06-23 21:23:05 +02:00
|
|
|
ynh_config_change_url_nginx
|
2023-12-13 21:25:13 +01:00
|
|
|
|
2023-12-15 14:32:22 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
|
2024-06-23 21:23:05 +02:00
|
|
|
ynh_replace --match="BASE_URL=https://$old_domain" --replace="BASE_URL=https://$new_domain" --file="$install_dir/.env"
|
2023-12-15 14:24:23 +01:00
|
|
|
|
2023-12-13 21:25:13 +01:00
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-06-23 21:23:05 +02:00
|
|
|
ynh_script_progression "Starting $app's systemd service..."
|
2023-12-13 21:25:13 +01:00
|
|
|
|
2024-06-23 21:23:05 +02:00
|
|
|
ynh_systemctl --service=$app --action="start" --log_path="systemd"
|
2023-12-13 21:25:13 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-06-23 21:23:05 +02:00
|
|
|
ynh_script_progression "Change of URL completed for $app"
|