lock util fix

This commit is contained in:
q
2017-02-14 22:45:54 +02:00
parent d3aaffd619
commit 8319620a84

View File

@@ -6,7 +6,7 @@ Usage: lock-util {lock-file} [-v] [command] [args]
Commands:
create
exist ( return 0 if lock exists )
old [age in seconds] ( return 0 if file younger than [args] seconds )
old [age in seconds] ( return 0 if file younger than [args] seconds or file not present )
remove
-v as first argument sets very verbose mode
@@ -59,7 +59,7 @@ _remove() {
[[ $COMMAND = "old" ]] && {
_exist || {
[[ "$VERBOSE" = "on" ]] && echo "LOCK FILE MISSING" | $BOXES
exit 1
exit 0
}
[[ -z "$ARG" ]] && _help && echo "MISSING ARGUMENT" | $BOXES && exit 1
created=$( stat -c %Y "$LOCKFILE" )