Remove ugly "post connect" hack

This commit is contained in:
Ivan Ilves 2017-04-02 17:56:03 +02:00
parent 11c09aeba4
commit 46e7959ffb
3 changed files with 3 additions and 5 deletions

View File

@ -23,7 +23,7 @@ if [[ -f /etc/resolv.conf.orig ]]; then
fi
if [[ ${SSH_PID} -ne 0 ]]; then
kill ${SSH_PID}; sleep 1
kill ${SSH_PID} &>/dev/null; sleep 1
fi
NETWORK_SERVICE="$($(dirname ${0})/get-network-service-name.sh)"

View File

@ -23,7 +23,7 @@ if [[ -f /etc/resolv.conf.orig ]]; then
fi
if [[ ${SSH_PID} -ne 0 ]]; then
kill ${SSH_PID}; sleep 1
kill ${SSH_PID} &>/dev/null; sleep 1
fi
ip tuntap del mode tun tun${TUNNEL_ID}

View File

@ -62,9 +62,7 @@ trap 'exit 130' INT
trap teardown EXIT
function teardown() {
if [[ ${SSH_PID} ]]; then
ssh ${SSH_OPTS} ${SSH_SERVER} pkill -f ${REMOTE_PATH}/server-execute.sh &>/dev/null &
else
if [[ ! ${SSH_PID} ]]; then
sudo ./scripts/${KERNEL}/client-teardown.sh ${$} 0 ${LOCAL_TUNNEL_ID}
fi
}