mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 10:40:07 +00:00
...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
15bad014b4
commit
96c6b07fe7
@ -41,6 +41,8 @@ xread "Wireguard endpoint: " ENDPOINT
|
||||
DFL_ENDPOINT_PORT=${DFL_ENDPOINT_PORT:=51820}
|
||||
xread "Wireguard endpoint port: " ENDPOINT_PORT
|
||||
|
||||
CLIENT_IPS=10.42.1.0/16
|
||||
|
||||
|
||||
readVars
|
||||
|
||||
@ -73,7 +75,7 @@ OPTS_STAGE_2="\
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
echo "# Building config..."
|
||||
buildAssets ENDPOINT ENDPOINT_PORT DNS
|
||||
buildAssets ENDPOINT ENDPOINT_PORT DNS CLIENT_IPS
|
||||
|
||||
echo "# Creating CT..."
|
||||
pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS"
|
||||
@ -83,6 +85,7 @@ echo "# Installing dependencies..."
|
||||
|
||||
echo "# Copying assets..."
|
||||
@ pct-push-r $ID ./assets /
|
||||
@ lxc-attach $ID -- chmod +x /root/getFreeClientIP
|
||||
|
||||
#echo "# Setup: wireguard server..."
|
||||
@ lxc-attach $ID -- bash -c 'cd /root && make server'
|
||||
|
||||
@ -11,7 +11,7 @@ SERVER_PUBLIC_KEY := $(SERVER_DIR)/server_id.pub
|
||||
CLIENT_TPL := templates/client.conf
|
||||
CLIENT_DIR := $(SERVER_DIR)/clients/
|
||||
|
||||
CLIENT_IPS ?= 10.42.0.0/16
|
||||
CLIENT_IPS ?= ${CLIENT_IPS}
|
||||
ENDPOINT_PORT ?= ${ENDPOINT_PORT}
|
||||
ENDPOINT ?= ${ENDPOINT}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CLIENT_IPS=${CLIENT_IPS}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user