1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jackett_ynh.git synced 2024-09-03 19:26:28 +02:00
jackett_ynh/scripts/change_url

46 lines
1.4 KiB
Text
Raw Normal View History

2021-05-21 14:24:10 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
2024-02-25 21:56:47 +01:00
ynh_script_progression --message="Stopping a systemd service..."
2021-05-21 14:24:10 +02:00
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2024-02-25 21:56:47 +01:00
ynh_script_progression --message="Updating NGINX web server configuration..."
ynh_change_url_nginx_config
2021-05-21 14:24:10 +02:00
# Change the path in the NGINX config file
2024-02-25 21:56:47 +01:00
if [ "$change_path" -eq 1 ]; then
2024-02-25 22:46:00 +01:00
_set_BasePathOverride
2021-05-21 14:24:10 +02:00
fi
#=================================================
# START SYSTEMD SERVICE
#=================================================
2024-02-25 21:56:47 +01:00
ynh_script_progression --message="Starting $app's systemd service..."
2021-05-21 14:24:10 +02:00
2024-02-25 21:56:47 +01:00
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
2021-05-21 14:24:10 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2021-05-22 20:54:43 +02:00
ynh_script_progression --message="Change of URL completed for $app"