1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Move sleep

This commit is contained in:
Kay0u 2020-03-25 01:22:21 +01:00
parent 02554f94e5
commit d1a2528c43
No known key found for this signature in database
GPG key ID: 7FF262C033518333
2 changed files with 4 additions and 4 deletions

View file

@ -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)"

View file

@ -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