diff --git a/src/borgwrapper b/src/borgwrapper index d45bad9..6c195d3 100755 --- a/src/borgwrapper +++ b/src/borgwrapper @@ -144,7 +144,7 @@ limit_bw () { export RATE_LIMIT=$(convert_rate ${BWLIMIT}) chmod +x ${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" } @@ -201,7 +201,9 @@ MODE="${1}" echo "Loading config from ${CONFIG}" source "${CONFIG}" || exit 1 +[[ -n ${BORG_RSH} ]] || BORG_RSH="ssh" export BORG_PASSPHRASE +export BORG_RSH LOCKFILE="${LOCKDIR}/$(echo -n "${BORG_REPO}" | md5sum | cut -d ' ' -f 1).lock" mkdir -p "${LOCKDIR}" diff --git a/src/config.example b/src/config.example index bd4218e..24791d4 100644 --- a/src/config.example +++ b/src/config.example @@ -30,6 +30,9 @@ KEEP_YEARLY=5 # Location of borgwrapper lock files #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. # The current default values are listed. Modify if needed. #BORG_CREATE_ARGS=(