Add config option to set BORG_RSH

dev
hk 2018-01-31 19:37:34 +01:00
parent 6e3f74e03f
commit 67db0abce1
2 changed files with 6 additions and 1 deletions

View File

@ -144,7 +144,7 @@ limit_bw () {
export RATE_LIMIT=$(convert_rate ${BWLIMIT}) export RATE_LIMIT=$(convert_rate ${BWLIMIT})
chmod +x ${PV_WRAPPER} chmod +x ${PV_WRAPPER}
echo -e '#!/bin/bash\npv -q -L ${RATE_LIMIT} | "$@"' > ${PV_WRAPPER} echo -e '#!/bin/bash\npv -q -L ${RATE_LIMIT} | "$@"' > ${PV_WRAPPER}
export BORG_RSH="${PV_WRAPPER} ssh" export BORG_RSH="${PV_WRAPPER} ${BORG_RSH}"
echo "Limiting bandwith to ${RATE_LIMIT} bytes/s" echo "Limiting bandwith to ${RATE_LIMIT} bytes/s"
} }
@ -201,7 +201,9 @@ MODE="${1}"
echo "Loading config from ${CONFIG}" echo "Loading config from ${CONFIG}"
source "${CONFIG}" || exit 1 source "${CONFIG}" || exit 1
[[ -n ${BORG_RSH} ]] || BORG_RSH="ssh"
export BORG_PASSPHRASE export BORG_PASSPHRASE
export BORG_RSH
LOCKFILE="${LOCKDIR}/$(echo -n "${BORG_REPO}" | md5sum | cut -d ' ' -f 1).lock" LOCKFILE="${LOCKDIR}/$(echo -n "${BORG_REPO}" | md5sum | cut -d ' ' -f 1).lock"
mkdir -p "${LOCKDIR}" mkdir -p "${LOCKDIR}"

View File

@ -30,6 +30,9 @@ KEEP_YEARLY=5
# Location of borgwrapper lock files # Location of borgwrapper lock files
#LOCKDIR="/run/lock/borgwrapper" #LOCKDIR="/run/lock/borgwrapper"
# You can add args, such as a custom identity key file, to ssh here
#BORG_RSH="ssh"
# Optional arguments to the different borg commands. # Optional arguments to the different borg commands.
# The current default values are listed. Modify if needed. # The current default values are listed. Modify if needed.
#BORG_CREATE_ARGS=( #BORG_CREATE_ARGS=(