From 99bcb0d20f156c2c1ab616533e017c79528eea80 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 15 Jan 2024 21:16:10 +0300 Subject: [PATCH] experimenting... Signed-off-by: Alex A. Naanou --- wireguard/templates/root/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wireguard/templates/root/Makefile b/wireguard/templates/root/Makefile index 8c496a7..5ec3a15 100644 --- a/wireguard/templates/root/Makefile +++ b/wireguard/templates/root/Makefile @@ -41,12 +41,12 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY) -e 's/\$${\SERVER_PRIVATE_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_KEY)")'/g' \ > "$@" chmod 600 $@ - wg-quick up wg0 + wg-quick up $(INTERFACE) # XXX need to figure out a way to link this to the .config file without # conflicting with the server's wg0.conf -%.client: $(CLIENT_TPL) $(SERVER_CLIENT_TPL) \ +%.conf: $(CLIENT_TPL) $(SERVER_CLIENT_TPL) \ $(CLIENT_DIR)/%_id $(CLIENT_DIR)/%_id.pub \ $(SERVER_CONF) $(SERVER_PUBLIC_KEY) @ mkdir -p $(CLIENT_DIR) @@ -60,6 +60,7 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY) -e 's/\$${\CLIENT_PRIVATE_KEY}/'$$(sed -e 's/\//\\\//g' "$(CLIENT_DIR)/$*_id")'/g' \ -e 's/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \ > "$(CLIENT_DIR)/$*.conf" + ln -s "$(CLIENT_DIR)/$*.conf" cat "$(SERVER_CLIENT_TPL)" \ | sed \ -e 's/\$${\CLIENT_IP}/$(shell ./getFreeClientIP)\/32/g' \ @@ -77,7 +78,7 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY) -%.qr: %.client +%.qr: %.conf @ ( echo "# Profile: $*" \ && qrencode -t UTF8 -r "$*.conf" )