1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fittrackee_ynh.git synced 2024-09-03 18:36:16 +02:00
fittrackee_ynh/scripts/change_url

53 lines
1.9 KiB
Text
Raw Normal View History

2023-03-06 20:16:50 +01:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
2023-03-06 21:23:33 +01:00
# STOP AND REMOVE SERVICE
2023-03-06 20:16:50 +01:00
#=================================================
2023-03-06 21:23:33 +01:00
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
# Remove the dedicated systemd config
ynh_remove_systemd_config --service="${app}"
ynh_remove_systemd_config --service="${app}_workers"
2023-03-06 20:16:50 +01:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_change_url_nginx_config
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# ...
#=================================================
#=================================================
# GENERIC FINALISATION
2023-03-06 21:23:33 +01:00
2023-03-06 20:16:50 +01:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
2023-03-06 21:23:33 +01:00
ynh_script_progression --message="Starting the systemd services..." --weight=15
2023-03-06 20:16:50 +01:00
2023-03-06 21:23:33 +01:00
# Start a systemd service
ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid"
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started"
2023-03-06 20:16:50 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last