1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my_webapp_ynh.git synced 2024-09-03 19:46:26 +02:00

fix change url

This commit is contained in:
Kayou 2024-07-23 16:36:00 +02:00 committed by GitHub
parent 7226257ce8
commit eca97b65aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,8 +45,6 @@ nginx_extra_conf_dir=/etc/nginx/conf.d/$old_domain.d/$app.d
# Change the path in the NGINX config file # Change the path in the NGINX config file
if [ $change_path -eq 1 ] if [ $change_path -eq 1 ]
then then
ynh_print_info --message="Change the path in the Nginx config file"
# Make a backup of the original NGINX config file if modified # Make a backup of the original NGINX config file if modified
ynh_backup_if_checksum_is_different --file="$nginx_conf_path" ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
@ -60,7 +58,7 @@ then
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf" ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
fi fi
# Create a dedicated NGINX configssh # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
fi fi
@ -70,7 +68,7 @@ then
# Delete file checksum for the old conf file location # Delete file checksum for the old conf file location
ynh_delete_file_checksum --file="$nginx_conf_path" ynh_delete_file_checksum --file="$nginx_conf_path"
ynh_delete_file_checksum --file="$nginx_extra_conf_dir/php.conf" ynh_delete_file_checksum --file="$nginx_extra_conf_dir/php.conf"
ynh_delete_file_checksum --file="$nginx_extra_conf_dir/nginx-code-error.conf" ynh_delete_file_checksum --file="$nginx_extra_conf_dir/code-error.conf"
path_url="$new_path" path_url="$new_path"
domain="$old_domain" domain="$old_domain"
@ -83,7 +81,7 @@ then
# Store file checksum for the new config file location # Store file checksum for the new config file location
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/php.conf" ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/php.conf"
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/nginx-code-error.conf" ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/code-error.conf"
fi fi
#================================================= #=================================================