2 tool
=$
(readlink
-e "${0%/*}/..")
3 .
"$tool"/remote
/lib.sh
5 PATH
=/usr
/lib
/gnupg2
:"$PATH"
7 IFS
= read -r pass
<<-EOF
8 $(gpg --decrypt "$tool"/var/sec/openpgp/backup+"$local_hostname"@"$local_domainname".pass.gpg)
10 for fpr
in $
("$tool"/remote
/gpg
--list-secret-keys --with-colons --with-fingerprint --with-fingerprint \
11 -- "backup+$local_hostname@$local_domainname" |
grep '^fpr:' | cut
-d : -f 10)
12 do gpg-preset-passphrase
--preset -v $fpr <<-EOF
17 "$tool"/remote
/gpg
--export-options export-reset-subkey-passwd \
18 --export-secret-subkeys "backup+$local_hostname@$local_domainname" |
19 "$tool"/remote
/ssh backup@
$local_fqdn gpg
--import -