diff options
-rwxr-xr-x | check-hosts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/check-hosts b/check-hosts index e629bab..6c7dcfd 100755 --- a/check-hosts +++ b/check-hosts @@ -40,8 +40,8 @@ get_stale_once() { ) done - comm -13 <(get_stale | sort) <(get_all | sort) | while read host; do - STALE_FILE="${STALE_DIR}/${host}" + comm -23 <(ls -1 ${STALE_DIR}/ | sort) <(get_all | sort) | while read file; do + STALE_FILE="${STALE_DIR}/${file}" test -f "${STALE_FILE}" && rm -f "${STALE_FILE}" done } |