/[adm]/puppet/modules/mirror/templates/mirrordir
ViewVC logotype

Diff of /puppet/modules/mirror/templates/mirrordir

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2309 by misc, Fri Jan 20 23:05:55 2012 UTC revision 2310 by misc, Fri Jan 20 23:05:57 2012 UTC
# Line 5  localdir="<%= localdir %>" Line 5  localdir="<%= localdir %>"
5  rsync_options="<%= rsync_options %>"  rsync_options="<%= rsync_options %>"
6  lockfile="<%= lockfile %>"  lockfile="<%= lockfile %>"
7    
8  test -f "$lockfile" && echo "sync already in progress" && exit  if [ -f "$lockfile" ]; then
9  touch "$lockfile"      # show error message when run from command line
10        [ -t 1 ] && cat $lockfile
11        exit
12    fi
13    echo "sync in progress since $(date)" > "$lockfile"
14  /usr/bin/rsync $rsync_options "$remoteurl" "$localdir"  /usr/bin/rsync $rsync_options "$remoteurl" "$localdir"
15  rm -f "$lockfile"  rm -f "$lockfile"
16    

Legend:
Removed from v.2309  
changed lines
  Added in v.2310

  ViewVC Help
Powered by ViewVC 1.1.28