support subnetClass from setupVARs.conf

This commit is contained in:
DerDanilo 2021-03-15 18:32:40 +01:00
parent 3c7175a41c
commit 805de5f77f
3 changed files with 7 additions and 1 deletions

View file

@ -24,7 +24,6 @@ piholeSetupVars="/etc/pihole/setupVars.conf"
dnsmasqConfig="/etc/dnsmasq.d/02-pivpn.conf" dnsmasqConfig="/etc/dnsmasq.d/02-pivpn.conf"
dhcpcdFile="/etc/dhcpcd.conf" dhcpcdFile="/etc/dhcpcd.conf"
subnetClass="24"
debianOvpnUserGroup="openvpn:openvpn" debianOvpnUserGroup="openvpn:openvpn"
######## PKG Vars ######## ######## PKG Vars ########
@ -1056,6 +1055,11 @@ installPiVPN(){
$SUDO mkdir -p /etc/pivpn/ $SUDO mkdir -p /etc/pivpn/
askWhichVPN askWhichVPN
# Allow custom subnetClass via unattend setupVARs file. Use default if not provided.
if [ -z "$subnetClass" ]; then
subnetClass="24"
fi
if [ "$VPN" = "openvpn" ]; then if [ "$VPN" = "openvpn" ]; then
pivpnDEV="tun0" pivpnDEV="tun0"

View file

@ -4,6 +4,7 @@ IPv4gw=192.168.23.1
dhcpReserv=0 dhcpReserv=0
install_user=pi install_user=pi
VPN=openvpn VPN=openvpn
subnetClass=24
pivpnPROTO=udp pivpnPROTO=udp
pivpnPORT=1194 pivpnPORT=1194
pivpnDNS1=9.9.9.9 pivpnDNS1=9.9.9.9

View file

@ -1,6 +1,7 @@
IPv4dev=eth0 IPv4dev=eth0
install_user=pi install_user=pi
VPN=wireguard VPN=wireguard
subnetClass=24
pivpnPORT=51820 pivpnPORT=51820
pivpnDNS1=9.9.9.9 pivpnDNS1=9.9.9.9
pivpnDNS2=149.112.112.112 pivpnDNS2=149.112.112.112