summaryrefslogtreecommitdiffstats
path: root/bin/sync-gentoo-ftp-mirror.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sync-gentoo-ftp-mirror.sh')
-rwxr-xr-xbin/sync-gentoo-ftp-mirror.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/sync-gentoo-ftp-mirror.sh b/bin/sync-gentoo-ftp-mirror.sh
new file mode 100755
index 0000000..74d9cdc
--- /dev/null
+++ b/bin/sync-gentoo-ftp-mirror.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+RSYNC="/usr/bin/rsync"
+OPTS="--quiet --recursive --links --perms --times --devices --delete --timeout=600 --password-file=/home/syncer/etc/gentoo_distfiles"
+SRC="gentoo@masterdistfiles.gentoo.org::gentoo"
+DST="/raid/ftp/pub/gentoo/"
+
+lockfile=/tmp/`basename $0`.lock
+
+if lockfile -r 5 $lockfile
+then
+ ${RSYNC} ${OPTS} ${SRC} ${DST}
+ echo "End: "`date`
+ rm -f $lockfile
+fi