mirror of
https://github.com/YunoHost-Apps/django_example_ynh.git
synced 2024-09-03 18:26:21 +02:00
41 lines
1.2 KiB
Bash
41 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# STOP SYSTEMD SERVICE
|
|
#=================================================
|
|
ynh_script_progression "Stopping systemd service '$app'..."
|
|
|
|
ynh_systemctl --service=$app --action="stop" --log_path="$log_file"
|
|
|
|
#=================================================
|
|
# MODIFY URL IN NGINX CONF
|
|
#=================================================
|
|
ynh_script_progression "Updating nginx web server configuration..."
|
|
|
|
ynh_config_change_url_nginx
|
|
|
|
#=================================================
|
|
# UPDATE DJANGO SETTINGS
|
|
#=================================================
|
|
ynh_script_progression "Update $app settings file..."
|
|
|
|
path=$new_path
|
|
domain=$new_domain
|
|
|
|
ynh_config_add --template="settings.py" --destination="$data_dir/settings.py"
|
|
|
|
#=================================================
|
|
# START SYSTEMD SERVICE
|
|
#=================================================
|
|
ynh_script_progression "Starting systemd service '$app'..."
|
|
|
|
ynh_systemctl --service=$app --action="start" --log_path="$log_file"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression "Change of URL completed for $app"
|