mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-27 01:30:12 +00:00
Less fragile way to add and remove clients (issue #1050)
This commit is contained in:
parent
b829bc09f1
commit
de127173dd
2 changed files with 7 additions and 7 deletions
|
@ -108,12 +108,12 @@ Endpoint = ${pivpnHOST}:${pivpnPORT}
|
|||
AllowedIPs = 0.0.0.0/0, ::0/0" >> "configs/${CLIENT_NAME}.conf"
|
||||
echo "::: Client config generated"
|
||||
|
||||
echo "# begin ${CLIENT_NAME}
|
||||
echo "### begin ${CLIENT_NAME} ###
|
||||
[Peer]
|
||||
PublicKey = $(cat "keys/${CLIENT_NAME}_pub")
|
||||
PresharedKey = $(cat "keys/${CLIENT_NAME}_psk")
|
||||
AllowedIPs = ${NET_REDUCED}.${COUNT}/32
|
||||
# end ${CLIENT_NAME}" >> wg0.conf
|
||||
### end ${CLIENT_NAME} ###" >> wg0.conf
|
||||
echo "::: Updated server config"
|
||||
|
||||
if [ -f /etc/pivpn/hosts.wireguard ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue