Browse Source

better error message

feature/auto_ssh
nicolas.dorier 6 years ago
parent
commit
0e532c4123
  1. 2
      btcpay-setup.sh

2
btcpay-setup.sh

@ -118,7 +118,7 @@ fi
if [[ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]]; then
DOMAIN_NAME="$(echo "$BTCPAY_HOST" | grep -P '(?=^.{4,253}$)(^(?:[a-zA-Z0-9](?:(?:[a-zA-Z0-9\-]){0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$)')"
if [[ ! "$DOMAIN_NAME" ]]; then
echo "BTCPAYGEN_REVERSEPROXY is set to nginx, so BTCPAY_HOST must point on a domain name, but the current value ('$BTCPAY_HOST') is not a valid domain name."
echo "BTCPAYGEN_REVERSEPROXY is set to nginx, so BTCPAY_HOST must be a domain name which point to this server (with port 80 and 443 open), but the current value of BTCPAY_HOST ('$BTCPAY_HOST') is not a valid domain name."
return
fi
BTCPAY_HOST="$DOMAIN_NAME"

Loading…
Cancel
Save