From 5a9eafc3febffc2fc1cf6c9d32359c0fd9bed390 Mon Sep 17 00:00:00 2001 From: Wouter Samaey Date: Mon, 10 Jun 2019 04:54:57 +0200 Subject: [PATCH] Fixed `grep` syntax for Mac OS (#145) --- btcpay-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btcpay-setup.sh b/btcpay-setup.sh index b200781..b2540e0 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -138,7 +138,7 @@ if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then fi if [[ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]] && [[ "$BTCPAY_HOST" ]]; 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,}$)')" + DOMAIN_NAME="$(echo "$BTCPAY_HOST" | grep -E '^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$')" if [[ ! "$DOMAIN_NAME" ]]; then 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