Bash-timers: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Simplest way to get a timer on something that does not have a builtin timeout system [https://serverfault.com/questions/361464/is-it-possible-to-set-a-timeout-on-openssls-s-c...") |
(No difference)
|
Latest revision as of 11:02, 12 January 2022
Simplest way to get a timer on something that does not have a builtin timeout system
timeout 5 bash -c "echo '' | ${OPENSSL} s_client -connect ${1}:${2} -servername ${CLN} ${TLSFLAG} 2> ${ERROR_TMP} 1> ${CERT_TMP}" || echo "ssl connection timeout" > ${ERROR_TMP} Exit code is non-zero on timeout Using a || will allow for the timeout itself to leave a message