summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-01-13 14:16:08 -0800
committerXiao Pan <gky44px1999@gmail.com>2024-01-13 14:16:08 -0800
commit2c69a98bb334f44a7d5c5cebb2cdd0313153688e (patch)
tree8f06bc25827e1c3fe3f8f06e5377c587faf61896
parent0e328ddd2df8a993f98bdeddaa56d0c6b2948fb8 (diff)
fix: duplicity --use-agent does not work when ssh to studio and pp
-rwxr-xr-xupd5
1 files changed, 4 insertions, 1 deletions
diff --git a/upd b/upd
index f09e540..0fd1e14 100755
--- a/upd
+++ b/upd
@@ -57,7 +57,10 @@ backup () {
# https://wiki.archlinux.org/title/Duplicity
# Need // for absolute path, see manpage URL FORMAT section. If not use //, will store to /home/xyz/home/xyz/...
# --files-from has a bug, this bug makes source url that is / not working while /home works, more see vq notes
- sudo duplicity --ssh-askpass --use-agent --encrypt-key 9790577D2BE328D46838117ED3F54FE03F3C68D6 --sign-key 05899270DF25BB1EEDF57BE824F769E5D08C9E9A --full-if-older-than 2Y --include /etc/.cfgs --include-filelist "/home/xyz/.config/myconf/upd_rsync_files" --exclude / / "sftp://xyz@xyzka.kyun.li//home/xyz/backup/$backup_branch"
+ # --use-agent not working when ssh to pp and insp, works on insp, not sure why
+ use_agent=
+ [ "$hostname" = xyzinsp ] && use_agent='--use-agent'
+ sudo duplicity --ssh-askpass $use_agent --encrypt-key 9790577D2BE328D46838117ED3F54FE03F3C68D6 --sign-key 05899270DF25BB1EEDF57BE824F769E5D08C9E9A --full-if-older-than 2Y --include /etc/.cfgs --include-filelist "/home/xyz/.config/myconf/upd_rsync_files" --exclude / / "sftp://xyz@xyzka.kyun.li//home/xyz/backup/$backup_branch"
fi
}