2019-02-03 21:40:29 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
2020-04-19 05:16:46 +02:00
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2020-05-30 15:28:48 +02:00
|
|
|
ynh_script_progression --message="Stopping a systemd service..."
|
2020-04-19 05:16:46 +02:00
|
|
|
|
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
|
|
|
|
2019-02-03 21:40:29 +01:00
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2020-11-16 16:41:23 +01:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..."
|
2019-02-03 21:40:29 +01:00
|
|
|
|
2023-05-31 20:58:29 +02:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2019-02-03 21:40:29 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
2022-06-16 01:28:41 +02:00
|
|
|
# UPDATE A CONFIG FILE
|
2019-02-03 21:40:29 +01:00
|
|
|
#=================================================
|
2022-06-16 01:28:41 +02:00
|
|
|
ynh_script_progression --message="Updating a configuration file..."
|
2023-05-31 21:08:32 +02:00
|
|
|
|
2019-02-03 21:40:29 +01:00
|
|
|
domain="$new_domain"
|
2023-05-31 20:58:29 +02:00
|
|
|
path="$new_path"
|
2019-02-03 21:40:29 +01:00
|
|
|
|
2023-06-01 08:32:39 +02:00
|
|
|
ynh_add_config --template="../conf/lstu.conf.ldap" --destination="$install_dir/lstu.conf"
|
2019-02-03 21:40:29 +01:00
|
|
|
|
2020-05-30 16:42:42 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Starting a systemd service..."
|
|
|
|
|
2022-07-30 00:06:35 +02:00
|
|
|
# Start a systemd service
|
|
|
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server available at"
|
2020-05-30 16:42:42 +02:00
|
|
|
|
2019-02-21 12:41:58 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-05-30 15:30:23 +02:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app"
|