From 477455b36bb9df1d5e4c33372afa93b2082f7a58 Mon Sep 17 00:00:00 2001 From: WhatTheServer Date: Sat, 24 Apr 2021 19:19:50 -0400 Subject: [PATCH] Update cyberpanel.sh fix inversed conditional and additional check to ensure resolving is done externally --- cyberpanel.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 3807901dc..ad20aebb3 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1784,8 +1784,8 @@ if [[ "$Server_Country" = "CN" ]] ; then Post_Install_CN_Replacement fi -# If valid hostname that resolves where we can issue an ssl we will create the hostname as a website so we can issue the SSL and do our first login without SSL warnings or exceptions needed. -HostName=$(hostname --fqdn); [ -z "$(dig +short "$HostName")" ] && echo "$HostName resolves to valid IP. Setting up hostname SSL" && cyberpanel createWebsite --package Default --owner admin --domainName $(hostname --fqdn) --email root@localhost --php 7.4 && cyberpanel hostNameSSL --domainName $(hostname --fqdn) +# If valid hostname is set that resolves externally we can issue an ssl. This will create the hostname as a website so we can issue the SSL and do our first login without SSL warnings or exceptions needed. +HostName=$(hostname --fqdn); [ -n "$(dig @1.1.1.1 +short "$HostName")" ] && echo "$HostName resolves to valid IP. Setting up hostname SSL" && cyberpanel createWebsite --package Default --owner admin --domainName $(hostname --fqdn) --email root@localhost --php 7.4 && cyberpanel hostNameSSL --domainName $(hostname --fqdn) }