diff --git a/scripts/openvpn/pivpn.sh b/scripts/openvpn/pivpn.sh index 0b85bd8..595d831 100755 --- a/scripts/openvpn/pivpn.sh +++ b/scripts/openvpn/pivpn.sh @@ -36,12 +36,13 @@ debugFunc() { echo "::: Generating Debug Output" ${SUDO} "${scriptDir}/${vpn}/pivpnDebug.sh" | tee /tmp/debug.log + e="${?}" echo "::: " echo "::: Debug output completed above." echo "::: Copy saved to /tmp/debug.log" echo "::: " - exit "${?}" + exit "${e}" } removeOVPNFunc() { diff --git a/scripts/wireguard/pivpn.sh b/scripts/wireguard/pivpn.sh index 53960c3..87660b2 100755 --- a/scripts/wireguard/pivpn.sh +++ b/scripts/wireguard/pivpn.sh @@ -31,12 +31,13 @@ debug() { echo "::: Generating Debug Output" ${SUDO} "${scriptdir}/${vpn}/pivpnDEBUG.sh" | tee /tmp/debug.log + e="${?}" echo "::: " echo "::: Debug output completed above." echo "::: Copy saved to /tmp/debug.log" echo "::: " - exit "${?}" + exit "${e}" } listClients() {