diff --git a/wireguard/templates/root/Makefile b/wireguard/templates/root/Makefile index a51cf7a..1f55bd1 100644 --- a/wireguard/templates/root/Makefile +++ b/wireguard/templates/root/Makefile @@ -40,6 +40,8 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY) -e 's/\$${\SERVER_PRIVATE_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_KEY)")'/g' \ > "$@" +# 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) \ $(CLIENT_DIR)/%_id $(CLIENT_DIR)/%_id.pub \ $(SERVER_CONF) $(SERVER_PUBLIC_KEY) @@ -54,7 +56,6 @@ $(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' \