store wireguard client public keys

This commit is contained in:
2026-02-09 15:57:34 +01:00
parent 26ff19a57b
commit 38d7dda164
2 changed files with 12 additions and 0 deletions

5
wg.mk
View File

@@ -1,3 +1,8 @@
public_key := $(shell cat /etc/wireguard/dmz_public_key)
name := $(shell git config list | grep user.nam | cut -d= -f2)
wgkeys.rec: /etc/wireguard/dmz_public_key
recins $@ -t $(basename $@) -f name -v "$(name)" -f pubkey -v "$(public_key)"
/etc/wireguard/dmz_private_key: | /bin/wg
$| genkey > $@