X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=all_new_2018%2Fborg.sh;h=18321b15fa949256cc3cd13077e6002ef73cee52;hb=a993e01131dcc84616f8352b2b2687f582a389cd;hp=1be74bb13f0730d5366378d7e77f5795bbaf128b;hpb=ec85942c7dda73e25ce2f0541a3f06818017a2e0;p=config
diff --git a/all_new_2018/borg.sh b/all_new_2018/borg.sh
index 1be74bb..18321b1 100755
--- a/all_new_2018/borg.sh
+++ b/all_new_2018/borg.sh
@@ -16,9 +16,13 @@ usage() {
}
read_pw() {
- eval $(ssh-agent)
- echo "ssh-add"
- ssh-add
+ if [ "${#SSH_AGENT_PID}" -eq 0 ]; then
+ eval $(ssh-agent)
+ echo "ssh-add"
+ stty -echo
+ ssh-add
+ stty echo
+ fi
if [ "${#BORG_PASSPHRASE}" -eq 0 ]; then
stty -echo
printf "Borg passphrase: "