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

Annotation of /puppet/modules/mirror/templates/mirrordir

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2310 - (hide annotations) (download)
Fri Jan 20 23:05:57 2012 UTC (12 years, 3 months ago) by misc
File size: 379 byte(s)
better error message when a sync is running, but only show when run
from command line
1 boklm 841 #!/bin/sh
2    
3     remoteurl="<%= remoteurl%>"
4     localdir="<%= localdir %>"
5     rsync_options="<%= rsync_options %>"
6     lockfile="<%= lockfile %>"
7    
8 misc 2310 if [ -f "$lockfile" ]; then
9     # 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 boklm 841 /usr/bin/rsync $rsync_options "$remoteurl" "$localdir"
15     rm -f "$lockfile"
16    

  ViewVC Help
Powered by ViewVC 1.1.30