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
f2e160acc4
commit
31dbf3acd2
@ -60,7 +60,6 @@ $(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" $*.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' \
|
||||||
@ -69,7 +68,10 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
|
|||||||
-e 's/\$${\CLIENT_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(CLIENT_DIR)/$*_id.pub")'/g' \
|
-e 's/\$${\CLIENT_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(CLIENT_DIR)/$*_id.pub")'/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' \
|
||||||
>> "$(SERVER_CONF)"
|
>> "$(SERVER_CONF)"
|
||||||
make update
|
make update $*.show
|
||||||
|
|
||||||
|
|
||||||
|
%.show: $(CLIENT_DIR)/%.conf
|
||||||
@ [ "$(QRCODE)" == "1" ] \
|
@ [ "$(QRCODE)" == "1" ] \
|
||||||
&& ( echo "# Profile: $*" \
|
&& ( echo "# Profile: $*" \
|
||||||
&& qrencode -t UTF8 -r "$(CLIENT_DIR)/$*.conf" )
|
&& qrencode -t UTF8 -r "$(CLIENT_DIR)/$*.conf" )
|
||||||
@ -77,12 +79,6 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
|
|||||||
@ echo
|
@ echo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%.qr: %.conf
|
|
||||||
@ ( echo "# Profile: $*" \
|
|
||||||
&& qrencode -t UTF8 -r "$*.conf" )
|
|
||||||
|
|
||||||
|
|
||||||
update:
|
update:
|
||||||
wg syncconf $(INTERFACE) <(wg-quick strip $(INTERFACE))
|
wg syncconf $(INTERFACE) <(wg-quick strip $(INTERFACE))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user