summaryrefslogtreecommitdiffstats
path: root/bin/sync-crux.sh
diff options
context:
space:
mode:
authorsyncer <root@plopp.spline.de>2012-01-11 18:17:09 +0100
committersyncer <root@plopp.spline.de>2012-01-11 18:18:29 +0100
commit657d1fc484fa0b21b979525a92ace5c9e6f63da2 (patch)
treef395b3a6f1993f4b5c4b46b8bebf04f730987739 /bin/sync-crux.sh
downloadmirror-sync-657d1fc484fa0b21b979525a92ace5c9e6f63da2.tar.gz
mirror-sync-657d1fc484fa0b21b979525a92ace5c9e6f63da2.tar.bz2
mirror-sync-657d1fc484fa0b21b979525a92ace5c9e6f63da2.zip
inital import
Diffstat (limited to 'bin/sync-crux.sh')
-rwxr-xr-xbin/sync-crux.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/sync-crux.sh b/bin/sync-crux.sh
new file mode 100755
index 0000000..9b14f6b
--- /dev/null
+++ b/bin/sync-crux.sh
@@ -0,0 +1,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