Explorar el Código

check_oracle.sh: fix shellcheck warning SC2009

Mario Trangoni hace 9 años
padre
commit
e21aee1222
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      plugins-scripts/check_oracle.sh

+ 1 - 1
plugins-scripts/check_oracle.sh

@@ -166,7 +166,7 @@ case "$cmd" in
     }'
     }'
     ;;
     ;;
 --db)
 --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
     if [ "${pmonchk}" -ge 1 ] ; then
         echo "${2} OK - ${pmonchk} PMON process(es) running"
         echo "${2} OK - ${pmonchk} PMON process(es) running"
         exit "$STATE_OK"
         exit "$STATE_OK"