2022-08-30 19:10:45 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-03-26 06:53:38 +01:00
|
|
|
ynh_script_progression --message="Stopping $app's systemd service..." --weight=1
|
2022-08-30 19:10:45 +02:00
|
|
|
|
2024-06-15 13:39:04 +02:00
|
|
|
ynh_systemd_action --service_name="$app-microservices" --action="stop" --log_path="/var/log/$app/$app-microservices.log"
|
2024-03-26 06:53:38 +01:00
|
|
|
ynh_systemd_action --service_name="$app-machine-learning" --action="stop" --log_path="/var/log/$app/$app-machine-learning.log"
|
|
|
|
ynh_systemd_action --service_name="$app-server" --action="stop" --log_path="/var/log/$app/$app-server.log"
|
2022-08-30 19:10:45 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
|
|
|
|
2024-03-26 06:53:38 +01:00
|
|
|
ynh_change_url_nginx_config
|
2022-08-30 19:10:45 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
|
|
|
|
2024-06-15 14:02:59 +02:00
|
|
|
ynh_systemd_action --service_name="$app-microservices" --action="start" --line_match="Immich Microservices is running" --log_path="/var/log/$app/$app-microservices.log"
|
2024-03-26 06:53:38 +01:00
|
|
|
ynh_systemd_action --service_name="$app-machine-learning" --action="start" --line_match="Application startup complete" --log_path="/var/log/$app/$app-machine-learning.log"
|
|
|
|
ynh_systemd_action --service_name="$app-server" --action="start" --line_match="Immich Server is listening" --log_path="/var/log/$app/$app-server.log"
|
2022-08-30 19:10:45 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|