From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 19 Dec 2018 22:01:27 +0000 (+0100)
Subject: Ensure we don't get asked for SSH passphrase repeatedly in borg script.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/new_day?a=commitdiff_plain;h=635bf647cf1479353c9e1b8423055cdb324a9c27;p=config

Ensure we don't get asked for SSH passphrase repeatedly in borg script.
---

diff --git a/all_new_2018/borg.sh b/all_new_2018/borg.sh
index 522285a..8cf0c44 100755
--- a/all_new_2018/borg.sh
+++ b/all_new_2018/borg.sh
@@ -14,6 +14,8 @@ usage() {
 }
 
 read_pw() {
+    eval $(ssh-agent)
+    ssh-add
     stty -echo
     printf "Passphrase: "
     read password