2021-02-16 13:38:59 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
2021-02-16 14:17:45 +01:00
|
|
|
source _common.sh
|
2021-02-16 13:38:59 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2021-02-16 14:17:45 +01:00
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2021-03-27 21:06:39 +01:00
|
|
|
ynh_script_progression --message="Stopping a systemd service..."
|
2021-02-16 14:17:45 +01:00
|
|
|
|
2022-07-03 16:40:34 +02:00
|
|
|
ynh_systemd_action --service_name=$app --action="stop"
|
2021-02-16 14:17:45 +01:00
|
|
|
|
2021-02-16 13:38:59 +01:00
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2021-03-27 21:06:39 +01:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..."
|
2021-02-16 13:38:59 +01:00
|
|
|
|
2023-03-12 22:15:34 +01:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2021-02-16 14:17:45 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2021-03-27 21:06:39 +01:00
|
|
|
ynh_script_progression --message="Starting a systemd service..."
|
2021-02-16 14:17:45 +01:00
|
|
|
|
2022-07-03 16:40:34 +02:00
|
|
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Serving on"
|
2021-02-16 14:17:45 +01:00
|
|
|
|
2021-02-16 13:38:59 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2021-03-27 21:06:39 +01:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app"
|