diff options
Diffstat (limited to 'bin/sync-dhozac.sh')
-rwxr-xr-x | bin/sync-dhozac.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/sync-dhozac.sh b/bin/sync-dhozac.sh new file mode 100755 index 0000000..7229e40 --- /dev/null +++ b/bin/sync-dhozac.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +RSYNC="/usr/bin/rsync" +OPTS="-Hax --delete --exclude=/plague/tmp" +SRC="rsync://rpm.hozac.com/dhozac/" +DST="/mirror/ftp/pub/dhozac/" + +lockfile=/tmp/`basename $0`.lock + +if lockfile -r 5 $lockfile +then + ${RSYNC} ${OPTS} ${SRC} ${DST} && date > "${DST}/lastsync" + echo "End: "`date` + rm -f $lockfile +fi |