2017-12-24 14:28:25 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-01-31 16:08:58 +01:00
|
|
|
#=================================================
|
2022-03-13 15:22:35 +01:00
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
2018-01-31 16:08:58 +01:00
|
|
|
#=================================================
|
|
|
|
|
2020-11-17 23:51:51 +01:00
|
|
|
# Import common cmd
|
2022-03-13 15:22:35 +01:00
|
|
|
source experimental_helper.sh
|
|
|
|
source _common.sh
|
2017-12-24 14:28:25 +01:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
2024-01-30 17:03:58 +01:00
|
|
|
# STANDARD MODIFICATIONS
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
2024-01-30 17:03:58 +01:00
|
|
|
# STOP SYSTEMD SERVICE
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
2024-01-30 17:03:58 +01:00
|
|
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
2022-03-13 15:22:35 +01:00
|
|
|
|
2024-02-27 23:20:13 +01:00
|
|
|
ynh_systemd_action --service_name="$app.service" --action="stop" --log_path="/var/log/$app/$app.log"
|
2017-12-24 14:28:25 +01:00
|
|
|
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2024-01-31 19:46:18 +01:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
2022-03-13 15:22:35 +01:00
|
|
|
|
2024-01-30 11:36:14 +01:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
2022-03-14 22:15:43 +01:00
|
|
|
|
2024-02-27 23:20:13 +01:00
|
|
|
set_permission
|
2017-12-24 14:28:25 +01:00
|
|
|
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Starting a systemd service..." --weight=3
|
|
|
|
|
|
|
|
# Start a systemd service
|
2024-02-27 23:20:13 +01:00
|
|
|
ynh_systemd_action --service_name="$app.service" --action="restart" --line_match "Listening at: unix:/run/$app/app.socket" --log_path systemd
|
2019-06-06 22:39:49 +02:00
|
|
|
|
2022-03-13 15:22:35 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2019-06-11 22:27:54 +02:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|