summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2022-06-06 21:34:02 +0200
committermakefu <github@syntax-fehler.de>2022-06-06 21:34:05 +0200
commitffdb73bed516bda154bb1c460a5e91eaaa6093da (patch)
tree54e54924bb7817cbe85b621d0eef99955f285339 /krebs/3modules
parent6087a17922c6b0b061b50cd2fa48de5597295f4a (diff)
ma retiolum: temporarily add helper script for retioum
Diffstat (limited to 'krebs/3modules')
-rwxr-xr-xkrebs/3modules/makefu/retiolum/doit.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/krebs/3modules/makefu/retiolum/doit.sh b/krebs/3modules/makefu/retiolum/doit.sh
new file mode 100755
index 000000000..1a2657599
--- /dev/null
+++ b/krebs/3modules/makefu/retiolum/doit.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+
+for i in *.pub;do
+ sleep 1
+ host=${i%%.pub}
+ if test -e "${host}_ed25519.pub" ;then
+ echo "ed25519 key already exits"
+ else
+ tmpdir=$(mktemp --tmpdir -d create-retiolum-ed25519-keys.XXXXXXXX)
+ trap 'rm -vR "$tmpdir"' EXIT
+ tinc --batch --config "$tmpdir" generate-ed25519-keys
+
+ cp -v "$tmpdir/ed25519_key.pub" "${host}_ed25519.pub"
+ cat "$tmpdir/ed25519_key.priv" | secrets insert -m "$host/retiolum.ed25519_key.priv"
+ rm -vR "$tmpdir"
+ fi
+
+done