Skip to content

Commit

Permalink
Add suffix to all client-names
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwep committed Jun 2, 2024
1 parent ec3e20d commit a5b4824
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The pihole admin dashboard can only be reached through the vpn under [http://pi.
### Generating `.ovpn` files

> [!WARNING]
> [!NOTE]
> Before you generate any client certificate, you must update the host in [client configuration](openvpn/config/client.conf).
> This file will be used as base-configuration for each `.ovpn` file! You probably at least want to change the IP address to your public one.
Expand Down
3 changes: 2 additions & 1 deletion clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ SCRIPT_NAME='./clients'

# Function to add clients
add_clients() {
local username_suffix=$(date +%Y)
local password=$1
shift
for name in "$@"; do
sudo docker exec openvpn bash /opt/app/bin/genclient.sh "$name" "$password"
sudo docker exec openvpn bash /opt/app/bin/genclient.sh "$name-$username_suffix" "$password"
done
}

Expand Down

0 comments on commit a5b4824

Please sign in to comment.