added credentials shortcut for rustic
This commit is contained in:
parent
eef4183c0f
commit
0983de6a96
2 changed files with 13 additions and 0 deletions
|
@ -94,3 +94,14 @@ function aws() {
|
|||
AWS_SECRET_ACCESS_KEY=$(sed -En 's/^Secret-Key: (.*)/\1/p' <<< "$PASS") \
|
||||
$AWS $@
|
||||
}
|
||||
|
||||
function restic() {
|
||||
local PASS=$(pass providers/aws)
|
||||
local RESTIC=$(which restic)
|
||||
|
||||
# Start original restic executable with short-lived keys
|
||||
AWS_ACCESS_KEY_ID=$(sed -En 's/^Access-Key: (.*)/\1/p' <<< "$PASS") \
|
||||
AWS_SECRET_ACCESS_KEY=$(sed -En 's/^Secret-Key: (.*)/\1/p' <<< "$PASS") \
|
||||
RESTIC_PASSWORD="$(pass static-3)" \
|
||||
$RESTIC $@
|
||||
}
|
||||
|
|
|
@ -49,5 +49,7 @@ else
|
|||
export EDITOR=vim
|
||||
fi
|
||||
|
||||
export RESTIC_REPOSITORY="s3://s3.amazonaws.com/stv0g-restic"
|
||||
|
||||
export DEBEMAIL="post@steffenvogel.de"
|
||||
export DEBFULLNAME="Steffen Vogel"
|
||||
|
|
Loading…
Add table
Reference in a new issue