summaryrefslogtreecommitdiff
path: root/scripts/wireguard-add-peer.sh
blob: 97c3cf31fd6e2e3583bb1ebce582d7ee397ccd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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