Hey Patrick,
thats my sync script.
#!/bin/bash
DESTPATH="/var/www/mirror/centos/"
RSYNC=/usr/bin/rsync
LOCKFILE=/tmp/rsync-centos.lock
synchronize() {
$RSYNC -rltvHa --delete-after --delay-updates --safe-links eu-msync.centos.org::CentOS "$DESTPATH"
}
if [ ! -e "$LOCKFILE" ]
then
echo $$ >"$LOCKFILE"
synchronize
else
PID=$(cat "$LOCKFILE")
if kill -0 "$PID" >&/dev/null
then
echo "Rsync - Synchronization still running"
exit 0
else
echo $$ >"$LOCKFILE"
echo "Warning: previous synchronization appears not to have finished correctly"
synchronize
fi
fi
rm -f "$LOCKFILE"
Greetings Alpix