From b32d3b8aa6605c08925e072d3a2ee6541dbc8ece Mon Sep 17 00:00:00 2001 From: Ludwig Behm Date: Sat, 17 Feb 2024 18:49:53 +0100 Subject: [PATCH] exec_borg.sh: pass stdin via `systemd_run --pipe` --- exec_borg.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exec_borg.sh b/exec_borg.sh index f4f6360..f6cb27e 100755 --- a/exec_borg.sh +++ b/exec_borg.sh @@ -18,7 +18,8 @@ usage() { [ $# == 0 ] && usage # do some sandboxinng -exec systemd-run --quiet --pipe --collect --unit=temp-borg-init-sandbox.service \ +exec systemd-run --quiet --collect --unit=temp-borg-init-sandbox.service \ + --pipe < /etc/borg/$NAME/borg_passphrase \ --working-directory=/tmp \ -p "ConfigurationDirectory=borg/$NAME" \ -p "CacheDirectory=borg/$NAME" \ @@ -31,4 +32,4 @@ exec systemd-run --quiet --pipe --collect --unit=temp-borg-init-sandbox.service --setenv=BORG_BASE_DIR=/tmp/ \ --setenv=BORG_CONFIG_DIR=/etc/borg/$NAME \ --setenv=BORG_CACHE_DIR=/var/cache/borg/$NAME \ - /usr/bin/borg $@ < /etc/borg/$NAME/borg_passphrase + /usr/bin/borg $@