2017-07-21 22:11:45 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-01-31 16:07:43 +01:00
|
|
|
#=================================================
|
2023-12-09 00:35:51 +01:00
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
2018-01-31 16:07:43 +01:00
|
|
|
#=================================================
|
|
|
|
|
2023-12-09 00:35:51 +01:00
|
|
|
source _common.sh
|
2024-04-04 00:28:32 +02:00
|
|
|
source experimental_helper.sh
|
2017-07-21 22:11:45 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2024-04-04 00:28:32 +02:00
|
|
|
load_vars
|
2017-07-21 22:11:45 +02:00
|
|
|
|
2018-01-31 16:07:43 +01:00
|
|
|
#=================================================
|
2017-07-21 22:11:45 +02:00
|
|
|
# STANDARD MODIFICATIONS
|
2018-01-31 16:07:43 +01:00
|
|
|
#=================================================
|
2023-12-09 00:35:51 +01:00
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
2018-01-31 16:07:43 +01:00
|
|
|
|
2023-12-09 00:35:51 +01:00
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
2018-05-19 20:44:15 +02:00
|
|
|
|
2023-12-09 00:35:51 +01:00
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
2018-05-19 20:44:15 +02:00
|
|
|
|
2023-12-09 00:35:51 +01:00
|
|
|
ynh_change_url_nginx_config
|
2017-07-21 22:11:45 +02:00
|
|
|
|
2023-12-09 00:35:51 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
2024-04-04 00:28:32 +02:00
|
|
|
ynh_add_jinja_config --template=monitorix.conf --destination=/etc/monitorix/monitorix.conf
|
2018-05-01 21:00:07 +02:00
|
|
|
|
2023-12-09 00:35:51 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
2024-04-26 21:41:46 +02:00
|
|
|
ynh_systemd_action --service_name="$app" --action=start --log_path='systemd' --line_match=' - Ok, ready.'
|
2023-12-09 00:35:51 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2019-06-07 23:09:30 +02:00
|
|
|
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|