Kay0u
6 years ago
No known key found for this signature in database
GPG Key ID: 7FF262C033518333
2 changed files with
4 additions and
4 deletions
-
scripts/_common.sh
-
scripts/upgrade
|
|
|
@ -38,9 +38,6 @@ is_url_handled() { |
|
|
|
# Manage arguments with getopts |
|
|
|
ynh_handle_getopts_args "$@" |
|
|
|
|
|
|
|
# Wait untils nginx has fully reloaded (avoid curl fail with http2) |
|
|
|
sleep 2 |
|
|
|
|
|
|
|
# Try to get the url with curl, and keep the http code and an eventual redirection url. |
|
|
|
local curl_output="$(curl --insecure --silent --output /dev/null \ |
|
|
|
--write-out '%{http_code};%{redirect_url}' https://127.0.0.1$path --header "Host: $domain" --resolve $domain:443:127.0.0.1)" |
|
|
|
|
|
|
|
@ -146,7 +146,7 @@ ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependenci |
|
|
|
#================================================= |
|
|
|
# NGINX CONFIGURATION |
|
|
|
#================================================= |
|
|
|
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2 |
|
|
|
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=3 |
|
|
|
|
|
|
|
ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf" |
|
|
|
|
|
|
|
@ -156,6 +156,9 @@ ynh_app_setting_delete --app=$app --key="checksum__etc_nginx_conf.d_$domain.d_$a |
|
|
|
|
|
|
|
ynh_systemd_action --service_name=nginx --action=reload |
|
|
|
|
|
|
|
# Wait untils nginx has fully reloaded |
|
|
|
sleep 1 |
|
|
|
|
|
|
|
# Check if .well-known is available for this domain |
|
|
|
if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav" |
|
|
|
then |
|
|
|
|