1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owncast-emojiwall_ynh.git synced 2024-09-03 19:56:19 +02:00
owncast-emojiwall_ynh/scripts/change_url
Neko Nekowazarashi 9d3d3d351b lagi-lagi lupa
2023-10-05 22:03:27 +07:00

53 lines
1.5 KiB
Bash

#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression -m "Stopping the systemd service..." -w 1
ynh_systemd_action -a stop
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression -m "Updating NGINX web server configuration..." -w 1
ynh_change_url_nginx_config
#=================================================
# MODIFY CONFIGURATION
#=================================================
if [ "$path" = "/" ]; then
conf_path=""
else
conf_path=$path
fi
ynh_add_config -t default.json -d "$install_dir/config/default.json"
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression -m "Starting the systemd service..." -w 1
ynh_systemd_action -a start
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression -m "Change of URL completed for $app" -l