Browse Source

Added wireguard module detection

pull/1/head
Julien Escario 4 years ago
parent
commit
ec40b5a473
  1. 5
      wireguard/deploy-wg-clients.sh

5
wireguard/deploy-wg-clients.sh

@ -9,6 +9,11 @@ if ! [[ $IP =~ ^[0-9]{1,3}$ ]] ; then
echo "error: Please set IP variable (with IP=1-254. See https://phpipam.altinea.fr" >&2; exit 1 echo "error: Please set IP variable (with IP=1-254. See https://phpipam.altinea.fr" >&2; exit 1
fi fi
if ! modprobe -q wireguard ; then
echo "Wireguard support missing. You should probably play with kernel headers and wireguard-dkms package"
exit 1
fi
# Create keys subdir, generate private and derive public key # Create keys subdir, generate private and derive public key
mkdir -p /etc/wireguard/keys mkdir -p /etc/wireguard/keys
umask 077 && wg genkey > /etc/wireguard/keys/private.key && wg pubkey < /etc/wireguard/keys/private.key > /etc/wireguard/keys/public.key && umask 0022 umask 077 && wg genkey > /etc/wireguard/keys/private.key && wg pubkey < /etc/wireguard/keys/private.key > /etc/wireguard/keys/public.key && umask 0022

Loading…
Cancel
Save