fix output of kill socat, increase waiting time for sigterm

This commit is contained in:
Gerrit Gogel 2021-01-27 16:28:51 +01:00
parent 4707d632d6
commit 3d90648998

View file

@ -26,11 +26,9 @@ function start_socat {
function stop_socat { function stop_socat {
echo "Stopping socat..." echo "Stopping socat..."
ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -15 > /dev/null ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -15 |& tee /dev/null
sleep 2 sleep 5
if [ -z $(ps aux | grep '[s]ocat')]; then ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -9 |& tee /dev/null
ps aux | grep '[s]ocat' | awk '{print $2}' | xargs kill -9 > /dev/null
fi
} }
function keep_running { function keep_running {