[monitoring-plugins] Fixing shellcheck SC2009
Jan Wagner
git at monitoring-plugins.org
Thu Dec 2 17:00:13 CET 2021
Module: monitoring-plugins
Branch: master
Commit: 1204d7fe56c9f35af6500f5ddbae733a622fb63d
Author: Jan Wagner <waja at cyconet.org>
Date: Fri Jan 6 17:56:03 2017 +0100
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=1204d7f
Fixing shellcheck SC2009
This requires pgrep from the procps package.
---
plugins-scripts/check_oracle.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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"
More information about the Commits
mailing list