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

42 lines
1.5 KiB
Text
Raw Normal View History

2018-04-23 22:40:01 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2021-05-01 08:52:00 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
2018-04-23 22:40:01 +02:00
2024-01-03 21:39:54 +01:00
ynh_change_url_nginx_config
2018-04-23 22:40:01 +02:00
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
2019-06-01 19:22:51 +02:00
# MOVE FOLDER IF NECESSARY
2018-04-23 22:40:01 +02:00
#=================================================
2024-01-03 21:39:54 +01:00
ynh_script_progression --message="Updating a configuration file..." --weight=1
2018-04-23 22:40:01 +02:00
2021-05-01 08:52:00 +02:00
# Change the domain for NGINX
2024-01-03 21:39:54 +01:00
if [ "$change_domain" -eq 1 ]; then
# Delete file checksum for the old conf file location
ynh_delete_file_checksum --file="$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 --file="$install_dir/sites/$new_domain/config.json"
2019-06-01 19:22:51 +02:00
fi
#=================================================
# END OF SCRIPT
#=================================================
2018-04-23 22:40:01 +02:00
2019-06-01 19:22:51 +02:00
ynh_script_progression --message="Change of URL completed for $app" --last