diff --git a/cyberpanel.sh b/cyberpanel.sh index 75e4205d3..135e07ab3 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1784,9 +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) }