diff --git a/auto_install/install.sh b/auto_install/install.sh index 989c7c2..0f3d12d 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -244,6 +244,8 @@ chooseInterface() { if [[ $(echo "${availableInterfaces}" | wc -l) -eq 1 ]]; then pivpnInterface="${availableInterfaces}" + echo "${pivpnInterface}" > /tmp/pivpnINT + $SUDO cp /tmp/pivpnINT /etc/pivpn/pivpnINTERFACE return fi diff --git a/pivpn b/pivpn index 684567a..fca88c2 100644 --- a/pivpn +++ b/pivpn @@ -29,14 +29,14 @@ function listOVPNFunc { function debugFunc { noUFW=$(cat /etc/pivpn/NO_UFW) echo "::: Generating Debug Output" - $SUDO . /opt/pivpn/pivpnDebug.sh | tee /tmp/debug.txt + $SUDO /opt/pivpn/pivpnDebug.sh | tee /tmp/debug.txt echo "::: " echo "::: Debug output completed above." echo "::: Copy saved to /tmp/debug.txt" echo "::: " if [[ ${noUFW} -eq 1 ]]; then - IPTABLES_FIX=`iptables -t nat -L -n -v | grep -c 'MASQUERADE.*10.8.0.0\/24'` - iptables -t nat -L -n -v | grep -q 'MASQUERADE.*10.8.0.0\/24' + IPTABLES_FIX=`$SUDO iptables -t nat -L -n -v | grep -c 'MASQUERADE.*10.8.0.0\/24'` + $SUDO iptables -t nat -L -n -v | grep -q 'MASQUERADE.*10.8.0.0\/24' if [ $? -ne 0 ]; then IPTABLES_FIX=2 fi