From d3aaffd619a72c1b21756eb9303d5fe9b4f97b29 Mon Sep 17 00:00:00 2001 From: q Date: Tue, 14 Feb 2017 22:41:34 +0200 Subject: [PATCH] lock util to use mod time instead of created time --- files/lock-util | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/lock-util b/files/lock-util index 7af3327..fc13e0d 100755 --- a/files/lock-util +++ b/files/lock-util @@ -62,7 +62,7 @@ _remove() { exit 1 } [[ -z "$ARG" ]] && _help && echo "MISSING ARGUMENT" | $BOXES && exit 1 - created=$( stat -c %Z "$LOCKFILE" ) + created=$( stat -c %Y "$LOCKFILE" ) now=$( date +%s ) age=$(( $now - $created )) test $ARG -lt $age