use pkill for socat shutdown

This commit is contained in:
Gerrit Gogel 2021-02-01 13:06:59 +01:00
parent 12d47893fe
commit e22a08bb7a

View file

@ -26,9 +26,9 @@ function start_socat {
function stop_socat {
echo "Stopping socat..."
ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -15 |& tee /dev/null
pkill -15 -f socat
sleep 5
ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -9 |& tee /dev/null
pkill -9 -f socat
}
function keep_running {