blob: b1d10a5e5625a4dab1a711f4e1da59cc13b63bf9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
#
# $Id$
#
# Script to rsync archives from hub.org
#
. $HOME/etc/archives.conf
export TZ=GMT
export LC_ALL=C
temp=""
heldlock=""
retval=1 # unless overridden later
# Need single quotes here to avoid expansion of variables until execution
trap 'rm -f $heldlock $REMOVE_FORCE_FILE $temp; exit $retval' \
EXIT QUIT INT TERM HUP
lockfile -r 0 $LOCKFILE_RSYNC || {
echo "Can't create rsync lockfile: $?" >&2
exit 1
}
heldlock=$LOCKFILE_RSYNC
cd $ARCHIVES_ROOT
$RSYNC -azH --delete --timeout=300 $MAJORDOMO_ORIGIN $MAJORDOMO_FILES --exclude='.*'
retval=$?
|