don't create lock for to early
This commit is contained in:
parent
c688a46f74
commit
412fcfad37
@ -6,7 +6,6 @@ import_images() {
|
||||
exec 2>> images.log
|
||||
declare -r oldIFS="$IFS"
|
||||
[[ -r .importing ]] && return 2
|
||||
touch .importing
|
||||
[[ -w "$rrdfile" ]] || rrdcreate
|
||||
readlast
|
||||
for file in dav/*
|
||||
@ -17,6 +16,8 @@ import_images() {
|
||||
IFS="$oldIFS"
|
||||
if (( $(date '+%Y%m%d%H%M%S' -d @${last[time]}) < $date$time ))
|
||||
then
|
||||
[[ -r .importing ]] && return 2
|
||||
touch .importing
|
||||
imagetime="${date:0:4}/${date:4:2}/${date:6:2} ${time:0:2}:${time:2:2}:${time:4:2}"
|
||||
echo "$(date +"%Y/%m/%d:%H:%M:%S") - $file: $imagetime"
|
||||
timestamp=$(date +%s -d "$imagetime")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user