diff --git a/wireguard/templates/root/Makefile b/wireguard/templates/root/Makefile index cb883bb..b2fcc43 100644 --- a/wireguard/templates/root/Makefile +++ b/wireguard/templates/root/Makefile @@ -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/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \ > "$(CLIENT_DIR)/$*.conf" - ln -s "$(CLIENT_DIR)/$*.conf" $*.client cat "$(SERVER_CLIENT_TPL)" \ | sed \ -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/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \ >> "$(SERVER_CONF)" - make update + make update $*.show + + +%.show: $(CLIENT_DIR)/%.conf @ [ "$(QRCODE)" == "1" ] \ && ( echo "# Profile: $*" \ && qrencode -t UTF8 -r "$(CLIENT_DIR)/$*.conf" ) @@ -77,12 +79,6 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY) @ echo - -%.qr: %.conf - @ ( echo "# Profile: $*" \ - && qrencode -t UTF8 -r "$*.conf" ) - - update: wg syncconf $(INTERFACE) <(wg-quick strip $(INTERFACE))