so-sensor-clean pgrep should be more strict to avoid matching multiples on Ubuntu

This commit is contained in:
Doug Burks
2022-04-20 16:47:18 -04:00
committed by GitHub
parent fe09b5b0d1
commit 8fc03afdc0

View File

@@ -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