From 1204d7fe56c9f35af6500f5ddbae733a622fb63d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Jan 2017 17:56:03 +0100 Subject: Fixing shellcheck SC2009 This requires pgrep from the procps package. diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index 0e751f3..70a3fef 100755 --- a/plugins-scripts/check_oracle.sh +++ b/plugins-scripts/check_oracle.sh @@ -165,7 +165,7 @@ case "$cmd" in }' ;; --db) - pmonchk=$(ps -ef | grep -v grep | grep -E -c "(asm|ora)_pmon_${2}$") + pmonchk=$(pgrep -f "(asm|ora)_pmon_${2}$") if [ "${pmonchk}" -ge 1 ] ; then echo "${2} OK - ${pmonchk} PMON process(es) running" exit "$STATE_OK" -- cgit v0.10-9-g596f