#!/bin/bash

lockfile-create "/tmp/Hackintosh.lockfile"
if [ $( mount | grep Hackintosh | wc -l )  == 0 ] ;
then	
sshfs souti@192.168.1.26:/Volumes/Data/ /media/Hackintosh/
fi

if [ $( mount | grep Hackintosh | wc -l )  == 1 ] ;
then	
	rsync -rvl --size-only /media/WDBlue/Musique/ /media/Hackintosh/Musique/
	rsync -rvl --size-only /media/WDBlue/SeriesTV/ /media/Hackintosh/SeriesTV/
	#rsync -rvl --progress --size-only /media/WDBlue/StockagePhoto/ /media/Hackintosh/StockagePhoto/
	rsync -rvl --size-only /media/WDBlue/films/ /media/Hackintosh/films/
fi

# /usr/bin/rsync -arvlp --bwlimit=1000 --size-only --exclude videos --exclude AppData --exclude Downloads --exclude Music /media/Acer/admin/ /media/MEMUP/AcerManon/ >/tmp/sync.log 2>/tmp/sync.err
lockfile-remove "/tmp/Hackintosh.lockfile"
