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

33 lines
1.1 KiB
Bash

#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression "Updating NGINX web server configuration..."
ynh_config_change_url_nginx
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# MOVE FOLDER IF NECESSARY
#=================================================
ynh_script_progression "Updating configuration..."
# Change the domain for NGINX
if [ "$change_domain" -eq 1 ]; then
# Delete file checksum for the old conf file location
ynh_delete_file_checksum "$install_dir/sites/$old_domain/config.json"
mv "$install_dir/sites/$old_domain" "$install_dir/sites/$new_domain"
# Store file checksum for the new config file location
ynh_store_file_checksum "$install_dir/sites/$new_domain/config.json"
fi
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Change of URL completed for $app"