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

Contents of /puppet/modules/mirror/templates/mirrordir

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2310 - (show annotations) (download)
Fri Jan 20 23:05:57 2012 UTC (10 years, 4 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 #!/bin/sh
2
3 remoteurl="<%= remoteurl%>"
4 localdir="<%= localdir %>"
5 rsync_options="<%= rsync_options %>"
6 lockfile="<%= lockfile %>"
7
8 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 /usr/bin/rsync $rsync_options "$remoteurl" "$localdir"
15 rm -f "$lockfile"
16

  ViewVC Help
Powered by ViewVC 1.1.28