Parent Directory | Revision Log
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.30 |