From ad326d409a125b4530a477c9735a5e2c65ca7397 Mon Sep 17 00:00:00 2001 From: dodger Date: Wed, 25 May 2022 12:37:31 +0200 Subject: [PATCH] catching output from get oracle home function --- check_remote_oracle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/check_remote_oracle b/check_remote_oracle index 5acfede..b294e84 100755 --- a/check_remote_oracle +++ b/check_remote_oracle @@ -1796,6 +1796,11 @@ fi SSH="ssh ${ORACLE_OSUSER}@${REMOTE_SERVER} -xq" get_remote_oraclehome +RES=$? +if [[ ${RES} -ne 0 ]] ; then + echo "CRITICAL - ORACLE_HOME not found" + exit ${STATE_CRITICAL} +fi # SQLPLUS FOR CONNECTIONS SQLPLUS="sqlplus -s '${ORACLEUSER}/${ORACLEUSERPASSWORD}@${ORACLE_SID}'"