blob: 6f9b3b6be910859097c357159c05f7b2db4837f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/sh
remoteurl="rsync://rsync.mageia.org/mageia"
localdir="/distrib/mageia"
rsync_options="-avH --delete"
lockfile="/home/mirror/locks/mageia"
if [ -f "$lockfile" ]; then
# show error message when run from command line
[ -t 1 ] && cat $lockfile
exit
fi
echo "sync in progress since $(date)" > "$lockfile"
/usr/bin/rsync $rsync_options "$remoteurl" "$localdir"
rm -f "$lockfile"
|