X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Fdup.in;h=89db671a3fd9f70b62891091fbd11c48705c2c91;hp=cae99097e814b764cacdb20d3ebfa6acb5fa2f46;hb=788e82b56a4bdd1758e9887788b8fb818c9850a3;hpb=f0caa9cc1bc25a9944ceb82d33a116e14bee4632 diff --git a/handlers/dup.in b/handlers/dup.in index cae9909..89db671 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -35,7 +35,7 @@ destdir=${destdir%/} ### SANITY CHECKS ############################################################## [ -n "$desturl" -o -n "$destdir" ] || fatal "The destination directory (destdir) must be set when desturl is not used." -[ -n "$include" ] || fatal "No source includes specified" +[ -n "$include" -o -n "$vsinclude" ] || fatal "No source includes specified" [ -n "$password" ] || fatal "The password option must be set." ### VServers @@ -105,7 +105,10 @@ duplicity_sub="`echo $duplicity_version | @AWK@ -F '.' '{print $3}'`" # --sftp-command ourselves scpoptions="$sshoptions" -[ "$bandwidthlimit" == 0 ] || scpoptions="$scpoptions -l $bandwidthlimit" +if [ "$bandwidthlimit" =! 0 ]; then + [ -z "$testurl" ] || warning 'The bandwidthlimit option is not used when desturl is set.' + scpoptions="$scpoptions -l $bandwidthlimit" +fi # < 0.4.2 : only uses ssh and scp if [ "$duplicity_major" -le 0 -a "$duplicity_minor" -le 4 -a "$duplicity_sub" -lt 2 ]; then @@ -163,6 +166,7 @@ if [ -n "$tmpdir" ]; then info "Temporary directory ($tmpdir) does not exist, creating it." mkdir -p "$tmpdir" [ $? -eq 0 ] || fatal "Could not create temporary directory ($tmpdir)." + chmod 0700 "$tmpdir" fi info "Using $tmpdir as TMPDIR" precmd="${precmd}TMPDIR=$tmpdir "