1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zwave-js-ui_ynh.git synced 2024-09-03 18:06:00 +02:00
zwave-js-ui_ynh/scripts/change_url

36 lines
1.1 KiB
Text
Raw Normal View History

2022-11-13 11:25:39 +01:00
#!/bin/bash
#=================================================
2024-09-01 17:54:21 +02:00
# IMPORT GENERIC HELPERS
2022-11-13 11:25:39 +01:00
#=================================================
2024-09-01 17:54:21 +02:00
source _common.sh
source /usr/share/yunohost/helpers
2022-11-13 11:25:39 +01:00
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression "Stopping $app's systemd service..."
2022-11-13 11:25:39 +01:00
2024-09-01 22:02:08 +02:00
ynh_systemctl --service="$app" --action="stop"
2022-11-13 11:25:39 +01:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression "Updating NGINX web server configuration..."
2022-11-13 11:25:39 +01:00
2024-09-01 22:28:37 +02:00
ynh_config_change_url_nginx
2022-11-13 11:25:39 +01:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression "Starting $app's systemd service..."
2022-11-13 11:25:39 +01:00
2024-09-01 22:02:08 +02:00
ynh_systemctl --service=$app --action="start" --wait_until="Listening on port" -t 30
2022-11-13 11:25:39 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Change of URL completed for $app"