diff options
Diffstat (limited to 'scripts/wireguard-add-peer.sh')
-rw-r--r-- | scripts/wireguard-add-peer.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/wireguard-add-peer.sh b/scripts/wireguard-add-peer.sh new file mode 100644 index 0000000..97c3cf3 --- /dev/null +++ b/scripts/wireguard-add-peer.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -euo pipefail +IFS=$'\n\t' + +if [[ $# -ne 1 ]]; then + echo "Usage: $0 <wg server config file>" + exit 1 +fi + +cat >> "$1" <<EOF + +# Auto-Generated +[Peer] +PublicKey = TODO +AllowedIPs = ::/0, 0.0.0.0/0 +Endpoint = TODO + +EOF |