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

56 lines
1.8 KiB
Text
Raw Normal View History

2023-05-26 19:09:08 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2024-01-18 13:19:08 +01:00
#REMOVEME? YNH_APP_ARG_DOMAIN=$YNH_APP_NEW_DOMAIN
#REMOVEME? YNH_APP_ARG_PATH=$YNH_APP_NEW_PATH
2023-05-26 19:09:08 +02:00
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping systemd service '$app'..."
ynh_systemd_action --service_name="$app" --action="stop"
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2023-05-31 18:46:06 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..."
2023-05-26 19:09:08 +02:00
2024-01-18 13:19:08 +01:00
ynh_change_url_nginx_config
2023-05-26 19:09:08 +02:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# MODIFY SETTINGS
#=================================================
ynh_script_progression --message="Modify $app config file..."
2024-01-18 13:19:08 +01:00
ynh_add_config --template="settings.py" --destination="$install_dir/settings.py"
2023-05-26 19:09:08 +02:00
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting systemd service '$app'..." --weight=5
ynh_systemd_action --service_name="$app" --action="start"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last