mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-29 19:20:10 +00:00
experimenting...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
438fc83115
commit
99bcb0d20f
@ -41,12 +41,12 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
|
|||||||
-e 's/\$${\SERVER_PRIVATE_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_KEY)")'/g' \
|
-e 's/\$${\SERVER_PRIVATE_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_KEY)")'/g' \
|
||||||
> "$@"
|
> "$@"
|
||||||
chmod 600 $@
|
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
|
# 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
|
||||||
%.client: $(CLIENT_TPL) $(SERVER_CLIENT_TPL) \
|
%.conf: $(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,6 +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"
|
||||||
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' \
|
||||||
@ -77,7 +78,7 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
%.qr: %.client
|
%.qr: %.conf
|
||||||
@ ( echo "# Profile: $*" \
|
@ ( echo "# Profile: $*" \
|
||||||
&& qrencode -t UTF8 -r "$*.conf" )
|
&& qrencode -t UTF8 -r "$*.conf" )
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user