From 8fc03afdc05f813beaaa6f42fadece9eb579c22d Mon Sep 17 00:00:00 2001 From: Doug Burks Date: Wed, 20 Apr 2022 16:47:18 -0400 Subject: [PATCH 1/2] so-sensor-clean pgrep should be more strict to avoid matching multiples on Ubuntu --- salt/common/tools/sbin/so-sensor-clean | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-sensor-clean b/salt/common/tools/sbin/so-sensor-clean index 22a0ae22b..624ff8106 100755 --- a/salt/common/tools/sbin/so-sensor-clean +++ b/salt/common/tools/sbin/so-sensor-clean @@ -115,7 +115,7 @@ clean() { } # Check to see if we are already running -NUM_RUNNING=$(pgrep -cf "so-sensor-clean") +NUM_RUNNING=$(pgrep -cf "/bin/bash /usr/sbin/so-sensor-clean") [ "$NUM_RUNNING" -gt 1 ] && echo "$(date) - $NUM_RUNNING sensor clean script processes running...exiting." >>$LOG && exit 0 if [ "$CUR_USAGE" -gt "$CRIT_DISK_USAGE" ]; then From 1edb443c5d19747df446358f4de1fa092150a82d Mon Sep 17 00:00:00 2001 From: Doug Burks Date: Wed, 20 Apr 2022 16:48:26 -0400 Subject: [PATCH 2/2] so-playbook-sync pgrep should be more strict to avoid multiple matches on Ubuntu --- salt/common/tools/sbin/so-playbook-sync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-playbook-sync b/salt/common/tools/sbin/so-playbook-sync index 91560aa0c..c2d20766e 100755 --- a/salt/common/tools/sbin/so-playbook-sync +++ b/salt/common/tools/sbin/so-playbook-sync @@ -18,7 +18,7 @@ . /usr/sbin/so-common # Check to see if we are already running -NUM_RUNNING=$(pgrep -cf "so-playbook-sync") +NUM_RUNNING=$(pgrep -cf "/bin/bash /usr/sbin/so-playbook-sync") [ "$NUM_RUNNING" -gt 1 ] && echo "$(date) - $NUM_RUNNING Playbook sync processes running...exiting." && exit 0 docker exec so-soctopus python3 playbook_play-sync.py