Hey Patrick,
thats my sync script.
#!/bin/bash
DESTPATH="/var/www/mirror/centos/"RSYNC=/usr/bin/rsyncLOCKFILE=/tmp/rsync-centos.lock
synchronize() {$RSYNC -rltvHa --delete-after --delay-updates --safe-links eu-msync.centos.org::CentOS "$DESTPATH"}
if [ ! -e "$LOCKFILE" ]thenecho $$ >"$LOCKFILE"synchronizeelsePID=$(cat "$LOCKFILE")if kill -0 "$PID" >&/dev/nullthenecho "Rsync - Synchronization still running"exit 0elseecho $$ >"$LOCKFILE"echo "Warning: previous synchronization appears not to have finished correctly"synchronizefifi
rm -f "$LOCKFILE"
Greetings Alpix
Am Fr., 8. März 2019 um 08:47 Uhr schrieb Alpix <contact@alpix.eu>:
Hello Patrick,
i have one.I will send it in a few minutes.
Greetings
Patrick Shaw <patrick@shaw.co.th> schrieb am Fr., 8. März 2019, 08:42:
Hi,
Does anyone have some examples of lock scripts/files for rsync? Due to
slow international performance in this country I'm regularly seeing
overlapping rsyncs, I need to get that locked down ASAP.
Patrick
_______________________________________________
CentOS-mirror mailing list
CentOS-mirror@centos.org
https://lists.centos.org/mailman/listinfo/centos-mirror
_______________________________________________ CentOS-mirror mailing list CentOS-mirror@centos.org https://lists.centos.org/mailman/listinfo/centos-mirror