2022-02-10 11:37:44 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Stopping a systemd service..."
|
|
|
|
|
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..."
|
|
|
|
|
2023-12-09 22:20:32 +01:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2022-02-10 11:37:44 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
2022-03-06 19:31:44 +01:00
|
|
|
# MODIFY CONFIGURATION
|
|
|
|
#=================================================
|
2022-02-10 11:37:44 +01:00
|
|
|
ynh_script_progression --message="Modifying a config file..."
|
2023-12-09 22:27:37 +01:00
|
|
|
|
2022-02-10 11:37:44 +01:00
|
|
|
domain="$new_domain"
|
2023-12-09 22:27:37 +01:00
|
|
|
ynh_add_config --template="app.json" --destination="$install_dir/config/app.json"
|
2022-02-10 11:37:44 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Starting a systemd service..."
|
|
|
|
|
2022-03-06 19:31:44 +01:00
|
|
|
# Start a systemd service
|
2022-02-10 11:37:44 +01:00
|
|
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app"
|