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

RSYNC="/usr/bin/rsync"
OPTS="-a --quiet --delete --timeout=600"
SRC="rsync://rsync.torproject.org/tor"
DST="/mirror/ftp/pub/tor"

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

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