exec_borg.sh: pass stdin via systemd_run --pipe
This commit is contained in:
parent
f0b481ad1d
commit
b32d3b8aa6
1 changed files with 3 additions and 2 deletions
|
@ -18,7 +18,8 @@ usage() {
|
||||||
[ $# == 0 ] && usage
|
[ $# == 0 ] && usage
|
||||||
|
|
||||||
# do some sandboxinng
|
# 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 \
|
--working-directory=/tmp \
|
||||||
-p "ConfigurationDirectory=borg/$NAME" \
|
-p "ConfigurationDirectory=borg/$NAME" \
|
||||||
-p "CacheDirectory=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_BASE_DIR=/tmp/ \
|
||||||
--setenv=BORG_CONFIG_DIR=/etc/borg/$NAME \
|
--setenv=BORG_CONFIG_DIR=/etc/borg/$NAME \
|
||||||
--setenv=BORG_CACHE_DIR=/var/cache/borg/$NAME \
|
--setenv=BORG_CACHE_DIR=/var/cache/borg/$NAME \
|
||||||
/usr/bin/borg $@ < /etc/borg/$NAME/borg_passphrase
|
/usr/bin/borg $@
|
||||||
|
|
Loading…
Reference in a new issue