2018-05-27 21:20:39 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-08-14 23:03:14 +02:00
|
|
|
source _common.sh
|
2018-05-27 21:20:39 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2022-07-06 06:41:20 +02:00
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_script_progression "Stopping $app's systemd service..."
|
2022-07-06 06:41:20 +02:00
|
|
|
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_systemctl --service=$app --action="stop" --log_path="systemd"
|
2022-07-06 06:41:20 +02:00
|
|
|
|
2018-05-27 21:20:39 +02:00
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_script_progression "Updating NGINX web server configuration..."
|
2018-05-27 21:20:39 +02:00
|
|
|
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_config_change_url_nginx
|
2018-05-27 21:20:39 +02:00
|
|
|
|
|
|
|
#=================================================
|
2022-07-06 06:41:20 +02:00
|
|
|
# UPDATE A CONFIG FILE
|
|
|
|
#=================================================
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_script_progression "Updating configuration..."
|
2020-08-14 23:08:47 +02:00
|
|
|
|
2022-02-11 09:01:40 +01:00
|
|
|
domain="$new_domain"
|
2023-12-07 14:42:07 +01:00
|
|
|
path="$new_path"
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
|
2020-08-14 23:08:47 +02:00
|
|
|
|
2022-07-06 06:41:20 +02:00
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_script_progression "Starting $app's systemd service..."
|
2022-07-06 06:41:20 +02:00
|
|
|
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_systemctl --service=$app --action="start" --log_path="systemd"
|
2022-07-06 06:41:20 +02:00
|
|
|
|
2019-05-01 20:35:48 +02:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2018-05-27 21:20:39 +02:00
|
|
|
|
2024-09-08 13:32:10 +02:00
|
|
|
ynh_script_progression "Change of URL completed for $app"
|