summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2014-05-07 02:30:43 -0400
committerAndrew Cady <d@jerkface.net>2014-05-07 02:30:43 -0400
commitf48861d8f12c3603cb25d7b79768b6031b3bbd1c (patch)
treeb6e5c8708ffce1576e00e8f923f2f78eb7c8c2ed /examples
parentb8d86807b0c9295cb7da706a228968e877695276 (diff)
samizdat-init-key.sh: use /root instead of not $HOME
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/samizdat-init-key.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/samizdat-init-key.sh b/examples/samizdat-init-key.sh
index 0bd7a32..1fde8d1 100755
--- a/examples/samizdat-init-key.sh
+++ b/examples/samizdat-init-key.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2export GNUPGHOME=$ROOT/gpg/gnupghome
2 3
3pem_to_onion_url() 4pem_to_onion_url()
4{ 5{
@@ -37,12 +38,12 @@ onion_url=$(pem_to_onion_url "$torkey") || exit
37echo "$passphrase" | \ 38echo "$passphrase" | \
38 kiki --keypairs \ 39 kiki --keypairs \
39 strongswan="$ROOT"/etc/ipsec.d/private/"$onion_url".pem{"$ssl"} \ 40 strongswan="$ROOT"/etc/ipsec.d/private/"$onion_url".pem{"$ssl"} \
40 ssh-client="$ROOT$HOME"/.ssh/id_rsa{"$ssh"} \ 41 ssh-client="$ROOT"/root/.ssh/id_rsa{"$ssh"} \
41 ssh-host="$ROOT"/etc/ssh/ssh_host_rsa_key{"$ssh"} \ 42 ssh-host="$ROOT"/etc/ssh/ssh_host_rsa_key{"$ssh"} \
42 --passphrase-fd 0 || exit 43 --passphrase-fd 0 || exit
43 44
44# Finally, export public keys if they do not exist. 45# Finally, export public keys if they do not exist.
45makepub ssh-client "$ROOT$HOME/.ssh/id_rsa.pub" 46makepub ssh-client "$ROOT/root/.ssh/id_rsa.pub"
46makepub ssh-host "$ROOT/etc/ssh/ssh_host_rsa_key.pub" 47makepub ssh-host "$ROOT/etc/ssh/ssh_host_rsa_key.pub"
47 48
48# TODO: makepub can be made obsolete by implementing something like this: 49# TODO: makepub can be made obsolete by implementing something like this: