2022-11-13 11:25:39 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
2024-09-01 17:54:21 +02:00
|
|
|
# IMPORT GENERIC HELPERS
|
2022-11-13 11:25:39 +01:00
|
|
|
#=================================================
|
|
|
|
|
2024-09-01 17:54:21 +02:00
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
2022-11-13 11:25:39 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-08-31 03:59:45 +02:00
|
|
|
ynh_script_progression "Stopping $app's systemd service..."
|
2022-11-13 11:25:39 +01:00
|
|
|
|
2024-09-01 22:02:08 +02:00
|
|
|
ynh_systemctl --service="$app" --action="stop"
|
2022-11-13 11:25:39 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2024-08-31 03:59:45 +02:00
|
|
|
ynh_script_progression "Updating NGINX web server configuration..."
|
2022-11-13 11:25:39 +01:00
|
|
|
|
2024-09-01 22:28:37 +02:00
|
|
|
ynh_config_change_url_nginx
|
2022-11-13 11:25:39 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-08-31 03:59:45 +02:00
|
|
|
ynh_script_progression "Starting $app's systemd service..."
|
2022-11-13 11:25:39 +01:00
|
|
|
|
2024-09-01 22:02:08 +02:00
|
|
|
ynh_systemctl --service=$app --action="start" --wait_until="Listening on port" -t 30
|
2022-11-13 11:25:39 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-08-31 03:59:45 +02:00
|
|
|
ynh_script_progression "Change of URL completed for $app"
|