prevent overlap at src

This commit is contained in:
Ignacio Nunez 2018-06-17 22:40:34 +02:00
parent 96d499006a
commit 9febef2666

View File

@ -110,6 +110,9 @@ ${DST_CMD[@]} true &>/dev/null || { echo "SSH access error to $NET. Do you have
${DST_CMD[@]} "[[ \$( pgrep -c \"btrfs-sync\" ) -ne $NUM_PS ]]" \
&& { echo "btrfs-sync already running at destination"; exit 1; }
ps -p "$( cat /run/btrfs-sync.pid 2>/dev/null )" &>/dev/null && { echo "$BIN is already running"; exit 1; }
echo $$ > /run/btrfs-sync.pid
## src checks
while read entry; do SRCS+=( "$entry" ); done < <(
for s in "${SRC[@]}"; do