scripts/vpn-client.sh

16 lines
229 B
Bash
Raw Normal View History

2021-07-31 23:20:54 +02:00
#!/bin/sh
usage() {
echo "Usage: vpn-client.sh <hostname>"
echo "hostname: Name of the new host"
exit 1
}
if [ $# != 1 ]; then
usage
fi
hostname=$1
wg genkey | tee "$hostname".key | wg pubkey >"$hostname".pub