2020-10-31 14:18:46 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-02-28 12:03:57 +01:00
|
|
|
ynh_script_progression --message="Stopping $app's systemd service..."
|
2020-10-31 14:18:46 +01:00
|
|
|
|
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped $app search index daemon"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2021-04-09 23:48:21 +02:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..."
|
2020-10-31 14:18:46 +01:00
|
|
|
|
2024-02-28 12:03:57 +01:00
|
|
|
ynh_change_url_nginx_config
|
2020-10-31 14:18:46 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-02-28 12:03:57 +01:00
|
|
|
ynh_script_progression --message="Starting $app's systemd service..."
|
2020-10-31 14:18:46 +01:00
|
|
|
|
|
|
|
# Start a systemd service
|
2024-02-28 12:03:57 +01:00
|
|
|
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Server listening on port"
|
2020-10-31 14:18:46 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app"
|