mirror of
https://github.com/pcvolkmer/docker-wireguard-boringtun.git
synced 2025-04-19 13:26:50 +00:00
Remove generation of PNG QR codes on init
This commit is contained in:
parent
8ec3461314
commit
0aa12e997f
@ -48,7 +48,7 @@ wg_1 | - Using port 51820
|
|||||||
wg_1 | - Using network 192.168.42.0/24
|
wg_1 | - Using network 192.168.42.0/24
|
||||||
wg_1 | - Using default MTU
|
wg_1 | - Using default MTU
|
||||||
wg_1 | - Forward all traffic
|
wg_1 | - Forward all traffic
|
||||||
wg_1 | - Generating 5 client configs and client QR codes
|
wg_1 | - Generating 5 client configs
|
||||||
wireguard_wg_1 exited with code 0
|
wireguard_wg_1 exited with code 0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ fi
|
|||||||
if (( $CLIENTS > 240 )); then
|
if (( $CLIENTS > 240 )); then
|
||||||
CLIENTS=240
|
CLIENTS=240
|
||||||
fi
|
fi
|
||||||
echo " - Generating $CLIENTS client configs and client QR codes"
|
echo " - Generating $CLIENTS client configs"
|
||||||
|
|
||||||
SERVER_SEC_KEY=$(wg genkey)
|
SERVER_SEC_KEY=$(wg genkey)
|
||||||
SERVER_PUB_KEY=$(echo $SERVER_SEC_KEY | wg pubkey)
|
SERVER_PUB_KEY=$(echo $SERVER_SEC_KEY | wg pubkey)
|
||||||
@ -127,10 +127,3 @@ Endpoint = $SERVER_HOST:$SERVER_PORT
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Create QR-codes for clients
|
|
||||||
if [ ! -z "$(which qrencode 2>/dev/null)" ]; then
|
|
||||||
for (( i=1; i<=$CLIENTS; i++ )); do
|
|
||||||
qrencode -t png -o "$DEVICE-client_$i.png" < $DEVICE-client_$i.conf
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
@ -50,7 +50,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
'purge')
|
'purge')
|
||||||
cd /etc/wireguard
|
cd /etc/wireguard
|
||||||
rm *.conf *.png 2>/dev/null
|
rm *.conf 2>/dev/null
|
||||||
echo "Removed all configuration files"
|
echo "Removed all configuration files"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user