2021-04-08 17:30:04 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-03-23 21:37:39 +01:00
|
|
|
ynh_script_progression --message="Stopping $app's systemd service..."
|
2021-04-08 17:30:04 +02:00
|
|
|
|
2024-01-29 17:32:21 +01:00
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
2021-04-08 17:30:04 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2022-01-31 08:47:43 +01:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..."
|
2021-04-08 17:30:04 +02:00
|
|
|
|
2024-01-29 17:21:02 +01:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2021-04-08 17:30:04 +02:00
|
|
|
#=================================================
|
2022-01-31 08:47:43 +01:00
|
|
|
# SPECIFIC MODIFICATIONS
|
2021-04-08 17:30:04 +02:00
|
|
|
#=================================================
|
2024-03-23 21:37:39 +01:00
|
|
|
ynh_script_progression --message="Configuring $app's systemd service..."
|
2024-01-29 17:25:45 +01:00
|
|
|
|
2021-04-08 17:30:04 +02:00
|
|
|
ynh_add_systemd_config
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-03-23 21:37:39 +01:00
|
|
|
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
|
2021-04-08 17:30:04 +02:00
|
|
|
|
2024-01-29 17:25:45 +01:00
|
|
|
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Movim daemon launched"
|
2021-04-08 17:30:04 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2022-01-31 08:47:43 +01:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app"
|