mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-29 11:10:09 +00:00
experimenting...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e8d45394de
commit
f2e160acc4
@ -105,7 +105,7 @@ echo "# Copying assets..."
|
|||||||
|
|
||||||
echo "# Setup: wireguard default profile..."
|
echo "# Setup: wireguard default profile..."
|
||||||
@ lxc-attach $ID -- bash -c "cd /root \
|
@ lxc-attach $ID -- bash -c "cd /root \
|
||||||
&& QRCODE=${QRCODE} make default.conf"
|
&& QRCODE=${QRCODE} make default.client"
|
||||||
|
|
||||||
echo "# client config:"
|
echo "# client config:"
|
||||||
@ mkdir -p clients
|
@ mkdir -p clients
|
||||||
|
|||||||
@ -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
|
# XXX need to figure out a way to link this to the .config file without
|
||||||
# conflicting with the server's wg0.conf
|
# 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 \
|
$(CLIENT_DIR)/%_id $(CLIENT_DIR)/%_id.pub \
|
||||||
$(SERVER_CONF) $(SERVER_PUBLIC_KEY)
|
$(SERVER_CONF) $(SERVER_PUBLIC_KEY)
|
||||||
@ mkdir -p $(CLIENT_DIR)
|
@ 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/\$${\CLIENT_PRIVATE_KEY}/'$$(sed -e 's/\//\\\//g' "$(CLIENT_DIR)/$*_id")'/g' \
|
||||||
-e 's/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \
|
-e 's/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \
|
||||||
> "$(CLIENT_DIR)/$*.conf"
|
> "$(CLIENT_DIR)/$*.conf"
|
||||||
ln -s "$(CLIENT_DIR)/$*.conf"
|
ln -s "$(CLIENT_DIR)/$*.conf" $*.client
|
||||||
cat "$(SERVER_CLIENT_TPL)" \
|
cat "$(SERVER_CLIENT_TPL)" \
|
||||||
| sed \
|
| sed \
|
||||||
-e 's/\$${\CLIENT_IP}/$(shell ./getFreeClientIP)\/32/g' \
|
-e 's/\$${\CLIENT_IP}/$(shell ./getFreeClientIP)\/32/g' \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user