timeout 2

This commit is contained in:
pvincent
2024-04-26 21:00:56 +04:00
parent 9c1e6c49d2
commit ad7f4b6d13
+2 -1
View File
@@ -6,7 +6,7 @@ function usage {
}
function connect_server {
openssl s_client -starttls smtp -connect "$server:587" -ign_eof 2>/dev/null <<EOF
timeout 2 openssl s_client -starttls smtp -connect "$server:587" -ign_eof 2>/dev/null <<EOF
quit
EOF
}
@@ -22,6 +22,7 @@ EOF
function check_smtp_connection {
echo -n "check smtp server <$server> port 587 ... "
set +e
if connect_server | grep -q CONNECTED; then
echo SUCCESSFUL CONNECTION
else