Skip to content

Commit

Permalink
print the first config
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Apr 9, 2020
1 parent b89e21b commit dd11c1b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions wg-ububtu-server-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# wg-ubuntu-server-up.sh [<number_of_clients>]

clients_count=${1:-10}
working_dir="$HOME/wireguard"

mkdir -p "$HOME/wireguard"
mkdir -p "${working_dir}"
mkdir -p "/etc/wireguard"

echo ------------------------------------------------------install linux headers
Expand All @@ -23,7 +24,7 @@ echo ----------------------------------------------------------install qrencode
sudo apt install -y qrencode

echo -------------------------------------------------- download wg-genconfig.sh
cd "$HOME/wireguard" &&
cd "${working_dir}" &&
wget https://raw.githubusercontent.com/drew2a/wireguard/master/wg-genconf.sh
chmod +x ./wg-genconf.sh

Expand Down Expand Up @@ -130,6 +131,14 @@ sudo systemctl start unbound
# show wg
wg show

echo && echo You can use this config: client1.conf
echo "--------------------------------------------------------↓"
cat "${working_dir}/client1.conf"
echo "--------------------------------------------------------↑"

echo && echo "Or you could find all the generated configs here: ${working_dir}"
echo

# reboot to make changes effective
echo all done, reboot...
echo All done, reboot...
reboot

0 comments on commit dd11c1b

Please sign in to comment.