change $pid to $rysnc_pidfile, change name of log to repo-sync.log