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 17:54:21 +02:00
|
|
|
ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app/$app.log"
|
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 17:54:21 +02:00
|
|
|
ynh_change_url_nginx_config
|
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 17:54:21 +02:00
|
|
|
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
|
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"
|