diff --git a/docker-gc b/docker-gc index 735d4f0..16ce95e 100755 --- a/docker-gc +++ b/docker-gc @@ -54,7 +54,7 @@ SYSLOG_LEVEL=${SYSLOG_LEVEL:=info} SYSLOG_TAG=${SYSLOG_TAG:=docker-gc} DRY_RUN=${DRY_RUN:=0} -for pid in $(pidof -s docker-gc); do +for pid in $(pgrep -f docker-gc); do if [[ $pid != $$ ]]; then echo "[$(date)] : docker-gc : Process is already running with PID $pid" exit 1