mirror of
https://github.com/faicker/wg-config.git
synced 2020-11-18 19:53:49 -08:00
rename client.conf to wg0.conf
This commit is contained in:
parent
c7003084f5
commit
e1e1b4ef91
@ -29,15 +29,15 @@ Running as root.
|
||||
./user.sh -a alice
|
||||
```
|
||||
|
||||
This will generate a client conf and qrcode in current directory which name is alice
|
||||
and add alice to the wg config.
|
||||
This will generate a client conf and qrcode in users directory which name is alice
|
||||
and add alice to the wg server config.
|
||||
|
||||
#### delete a user
|
||||
|
||||
```bash
|
||||
./user.sh -d alice
|
||||
```
|
||||
This will delete the alice directory and delete alice from the wg config.
|
||||
This will delete the alice directory and delete alice from the wg server config.
|
||||
|
||||
#### clear all
|
||||
|
||||
|
4
user.sh
4
user.sh
@ -71,8 +71,8 @@ add_user() {
|
||||
echo "no available ip"
|
||||
exit 1
|
||||
fi
|
||||
eval "echo \"$(cat "${template_file}")\"" > $userdir/client.conf
|
||||
qrencode -o $userdir/$user.png < $userdir/client.conf
|
||||
eval "echo \"$(cat "${template_file}")\"" > $userdir/wg0.conf
|
||||
qrencode -o $userdir/$user.png < $userdir/wg0.conf
|
||||
|
||||
# change wg config
|
||||
local ip=${_VPN_IP%/*}/32
|
||||
|
Loading…
x
Reference in New Issue
Block a user