summaryrefslogtreecommitdiffstats
path: root/bin/sync-crux.sh
blob: 9b14f6b221af9656becd0639ae003b90fc5e1175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

RSYNC="/usr/bin/rsync"
OPTS="--quiet --recursive --links --perms --times --devices --delete --timeout=600"
SRC="rsync://rsync.crux.nu/crux/"
DST="/mirror/ftp/pub/crux/"

lockfile=/tmp/`basename $0`.lock

if lockfile -r 5 $lockfile
then
	${RSYNC} ${OPTS} ${SRC} ${DST}
	echo "End: "`date`
	rm -f $lockfile
fi