Browse Source

Kill OpenSSL server if its already running before validating SSL certificate (#3505)

Alexandros Ioannides 2 years ago
parent
commit
a74a7c97a1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      func/domain.sh

+ 4 - 0
func/domain.sh

@@ -442,6 +442,10 @@ is_web_domain_cert_valid() {
 		check_result "$E_FORBIDEN" "SSL Key is protected (remove pass_phrase)"
 	fi
 
+	if pgrep -x "openssl" > /dev/null; then
+		pkill openssl
+	fi
+
 	openssl s_server -quiet -cert $ssl_dir/$domain.crt \
 		-key $ssl_dir/$domain.key >> /dev/null 2>&1 &
 	pid=$!