At a guess you are starting off a new copy before the old one has finished.
This is what I normally use
LOCKFILE="/var/lock/`basename $0`"
(
flock -n 9 || {
echo "$0 already running"
exit 1
}
rclone commands go here
) 9>$LOCKFILE
At a guess you are starting off a new copy before the old one has finished.
This is what I normally use
LOCKFILE="/var/lock/`basename $0`"
(
flock -n 9 || {
echo "$0 already running"
exit 1
}
rclone commands go here
) 9>$LOCKFILE