diff options
Diffstat (limited to 'bin/sync-tor.sh')
-rwxr-xr-x | bin/sync-tor.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/sync-tor.sh b/bin/sync-tor.sh new file mode 100755 index 0000000..d1df555 --- /dev/null +++ b/bin/sync-tor.sh @@ -0,0 +1,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 |