wg/install.sh
2024-12-27 11:37:11 +00:00

12 lines
271 B
Bash
Executable File

#!/bin/bash -e
. .env
export iface; iface="$(ip route show default | grep -Po 'dev\s+\K\w+')"
export privkey; privkey="$(wg genkey)"
envsubst < nftables.conf > /etc/wireguard/nftables.conf
envsubst < wg0.conf > /etc/wireguard/wg0.conf
systemctl enable wg-quick@wg0