mirror of
https://github.com/aljazceru/btcpayserver-docker.git
synced 2026-01-16 21:34:30 +01:00
BTCPAY_HOST can be empty
This commit is contained in:
@@ -74,11 +74,11 @@ if [ "$1" != "-i" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "$BTCPAY_HOST" ]; then
|
||||
if [ -z "$BTCPAYGEN_CRYPTO1" ]; then
|
||||
if [ -f "/etc/profile.d/btcpay-env.sh" ]; then
|
||||
echo "This script must be run as root after running \"sudo su -\""
|
||||
else
|
||||
echo "BTCPAY_HOST should not be empty"
|
||||
echo "BTCPAYGEN_CRYPTO1 should not be empty"
|
||||
fi
|
||||
return
|
||||
fi
|
||||
@@ -129,7 +129,7 @@ if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]]; then
|
||||
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,}$)')"
|
||||
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."
|
||||
|
||||
Reference in New Issue
Block a user