]>
Git — Sourcephile - sourcephile-nix.git/blob - hosts/losurdo/encrypt.sh
5 gpg
=$(realpath -e "$1")
7 name
=${NAME:-${base##*/}}
10 SECRET
=$(mktemp /dev/shm/secret.XXXXXXX)
11 trap 'chmod 600 $SECRET; shred --remove=unlink $SECRET' EXIT
12 gpg
--batch --decrypt "$gpg" |
13 ssh -o StrictHostKeyChecking
=yes -o ControlMaster
=auto
-o ControlPersist
=16s root@losurdo.sp
-- systemd
-creds encrypt
--name "$name" --with-key=auto
- - |
14 install -D -m 640 /dev
/stdin
"$SECRET"
15 cp "$SECRET" "$base".cred