summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2015-11-23 07:58:23 -0500
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2015-11-23 07:58:23 -0500
commit7868ba4cb52dad47295df961d4fc735b4778435e (patch)
tree73f7e65a100aefa5e1bf94aa1b8c3dfbe7284ed4 /bin
parentf8fa6e6c5ecf5bd3af49dbf348ff3552ebf2ff6d (diff)
ssh keys.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/kj-sync-keys.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/kj-sync-keys.sh b/bin/kj-sync-keys.sh
index b8be72d..b009e47 100755
--- a/bin/kj-sync-keys.sh
+++ b/bin/kj-sync-keys.sh
@@ -13,12 +13,9 @@ declare -r tmpdir=$(mktemp -d /tmp/kj_sync_authorized_keys.XXXXX)
targets=(
root@orbekk.osl.trygveandre.net
tesuji.6.orbekk.com
- login.6.orbekk.com
- minecraft.6.orbekk.com
+ sabaki.6.orbekk.com
login.pvv.ntnu.no
- aji.orbekk.com
- moyo.orbekk.com
- pi@photobox.6.orbekk.com
+ gote.orbekk.com
)
authorized_keys_file=$HOME/dotfiles/authorized_keys
if [[ ! -f "${authorized_keys_file}" ]]; then
@@ -32,7 +29,7 @@ add_keys_to_file() {
"/$begin_marker/"' { exit 0 } { print }' \
${filename} > ${filename}.header
awk \
- "/$end_marker/"' { should_output=1 } should_output { print }' \
+ "/$end_marker/"' { should_output=1 } !'"/$end_marker/"' { if (should_output) { print } }' \
${filename} > ${filename}.footer
cat "${filename}.header" > ${filename}