1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pyinventory_ynh.git synced 2024-09-03 20:16:09 +02:00
pyinventory_ynh/scripts/change_url

50 lines
1.6 KiB
Text
Raw Normal View History

2020-12-07 16:20:37 +01:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping systemd service '$app'..."
2020-12-07 16:20:37 +01:00
ynh_systemd_action --service_name=$app --action="stop" --log_path="$log_file"
2020-12-07 16:20:37 +01:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating nginx web server configuration..."
ynh_change_url_nginx_config
2020-12-07 16:20:37 +01:00
#=================================================
# UPDATE DJANGO SETTINGS
2020-12-07 16:20:37 +01:00
#=================================================
ynh_script_progression --message="Update $app settings file..." --weight=1
path=$new_path
domain=$new_domain
2022-09-17 17:48:01 +02:00
ynh_add_config --template="settings.py" --destination="$data_dir/settings.py"
2020-12-07 16:20:37 +01:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting systemd service '$app'..." --weight=5
2020-12-07 16:20:37 +01:00
ynh_systemd_action --service_name=$app --action="start" --log_path="$log_file"
2020-12-07 16:20:37 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last