2020-05-21 12:49:24 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
2020-06-13 16:12:37 +02:00
|
|
|
# GENERIC STARTING
|
2020-05-21 12:49:24 +02:00
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
|
|
|
|
2020-05-29 22:31:43 +02:00
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
2020-05-21 12:49:24 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2020-10-12 22:05:07 +02:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
2020-05-21 12:49:24 +02:00
|
|
|
|
2023-04-27 11:08:37 +02:00
|
|
|
ynh_change_url_nginx_config
|
2020-05-21 12:49:24 +02:00
|
|
|
|
2020-07-06 12:24:00 +02:00
|
|
|
#=================================================
|
|
|
|
# CONFIGURE CODIMD
|
|
|
|
#=================================================
|
|
|
|
|
2023-04-27 11:08:37 +02:00
|
|
|
path=${path:1}
|
2021-06-21 11:14:57 +02:00
|
|
|
domain=new_domain
|
2023-12-24 14:39:50 +01:00
|
|
|
ynh_add_config --template="config.json.example" --destination="$install_dir/config.json"
|
2020-07-06 12:24:00 +02:00
|
|
|
|
2020-05-21 12:49:24 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
|
|
|
|
2020-06-13 16:12:37 +02:00
|
|
|
# Start a systemd service
|
2021-05-08 12:13:28 +02:00
|
|
|
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening"
|
2020-05-21 12:49:24 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2022-02-04 00:57:49 +01:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|