From 1836accb1581b6ca127074d7731ebe7d24b28a6c Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Tue, 14 Feb 2017 16:14:48 +0200 Subject: [PATCH] fixed missing files problem --- files/lock-util | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/lock-util b/files/lock-util index db27f5c..7af3327 100755 --- a/files/lock-util +++ b/files/lock-util @@ -57,6 +57,11 @@ _remove() { } [[ $COMMAND = "old" ]] && { + _exist || { + [[ "$VERBOSE" = "on" ]] && echo "LOCK FILE MISSING" | $BOXES + exit 1 + } + [[ -z "$ARG" ]] && _help && echo "MISSING ARGUMENT" | $BOXES && exit 1 created=$( stat -c %Z "$LOCKFILE" ) now=$( date +%s ) age=$(( $now - $created ))