diff options
Diffstat (limited to 'modules/mirror/templates/mirrordir')
-rw-r--r-- | modules/mirror/templates/mirrordir | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/mirror/templates/mirrordir b/modules/mirror/templates/mirrordir new file mode 100644 index 00000000..85b54389 --- /dev/null +++ b/modules/mirror/templates/mirrordir @@ -0,0 +1,12 @@ +#!/bin/sh + +remoteurl="<%= remoteurl%>" +localdir="<%= localdir %>" +rsync_options="<%= rsync_options %>" +lockfile="<%= lockfile %>" + +test -f "$lockfile" && exit +touch "$lockfile" +/usr/bin/rsync $rsync_options "$remoteurl" "$localdir" +rm -f "$lockfile" + |