aboutsummaryrefslogtreecommitdiffstats
path: root/config/shione/wireguard/generate_keys.sh
diff options
context:
space:
mode:
authorRenken <renken@shione.net>2023-12-25 22:55:06 +0100
committerRenken <renken@shione.net>2024-02-20 22:54:05 +0100
commit900156b511187d9ce393a55475a8b205e3afeb13 (patch)
treea25e1af805214289e8bba0a4130e49b358c75b2f /config/shione/wireguard/generate_keys.sh
parent81b8b02ac9486a1e5248b56351712059faede632 (diff)
downloadshione-900156b511187d9ce393a55475a8b205e3afeb13.tar.gz
shione-900156b511187d9ce393a55475a8b205e3afeb13.zip
config: shione: incomplete wireguard setup
Diffstat (limited to 'config/shione/wireguard/generate_keys.sh')
-rwxr-xr-xconfig/shione/wireguard/generate_keys.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/shione/wireguard/generate_keys.sh b/config/shione/wireguard/generate_keys.sh
new file mode 100755
index 0000000..4c564a4
--- /dev/null
+++ b/config/shione/wireguard/generate_keys.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -eux
+
+cd -- files/etc/wireguard
+(umask 077; wg genkey | tee shione.private.key | wg pubkey > shione.public.key)
+# TODO: chmod 0600 all files under files/etc/wireguard.
+# TODO: Update files/etc/wireguard/wg0.conf accordingly.
+cd -- -