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

52 lines
1.8 KiB
Text
Raw Permalink Normal View History

2023-10-05 15:34:34 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
2023-10-06 14:19:55 +02:00
ynh_script_progression --message="Stopping a systemd service..." --weight=1
2023-10-05 15:34:34 +02:00
2023-10-06 15:52:08 +02:00
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
2023-10-05 15:34:34 +02:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2023-10-06 14:19:55 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
2023-10-05 15:34:34 +02:00
ynh_change_url_nginx_config
#=================================================
# MODIFY CONFIGURATION
#=================================================
2023-10-06 15:51:23 +02:00
ynh_script_progression --message="Adding a configuration file..." --weight=1
2023-10-05 15:34:34 +02:00
2023-10-06 15:51:23 +02:00
ynh_add_config --template="../conf/default.json" --destination="$install_dir/config/default.json"
2023-10-05 18:35:16 +02:00
2023-10-06 15:51:23 +02:00
chmod 400 "$install_dir/config/default.json"
chown $app:$app "$install_dir/config/default.json"
2023-10-05 15:34:34 +02:00
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
2023-10-06 15:51:51 +02:00
ynh_script_progression --message="Starting the systemd service..." --weight=1
2023-10-05 15:34:34 +02:00
2023-10-06 15:51:23 +02:00
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
2023-10-05 15:34:34 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2023-10-06 15:51:51 +02:00
ynh_script_progression --message="Change of URL completed for $app" --last