experimenting...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-01-15 21:22:55 +03:00
parent e8d45394de
commit f2e160acc4
2 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ echo "# Copying assets..."
echo "# Setup: wireguard default profile..."
@ lxc-attach $ID -- bash -c "cd /root \
&& QRCODE=${QRCODE} make default.conf"
&& QRCODE=${QRCODE} make default.client"
echo "# client config:"
@ mkdir -p clients

View File

@ -46,7 +46,7 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
# XXX need to figure out a way to link this to the .config file without
# conflicting with the server's wg0.conf
%.conf: $(CLIENT_TPL) $(SERVER_CLIENT_TPL) \
%.client: $(CLIENT_TPL) $(SERVER_CLIENT_TPL) \
$(CLIENT_DIR)/%_id $(CLIENT_DIR)/%_id.pub \
$(SERVER_CONF) $(SERVER_PUBLIC_KEY)
@ mkdir -p $(CLIENT_DIR)
@ -60,7 +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"
ln -s "$(CLIENT_DIR)/$*.conf" $*.client
cat "$(SERVER_CLIENT_TPL)" \
| sed \
-e 's/\$${\CLIENT_IP}/$(shell ./getFreeClientIP)\/32/g' \