This commit is contained in:
Oleg Sheynin 2023-04-24 19:09:40 -04:00
parent e9a07b1b74
commit 732ba31473
2 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
0.0.9 0.1.1

View File

@ -90,8 +90,14 @@ function kill_it {
while (timeout 3 curl -s localhost:${ServicePort}/ping > /dev/null) while (timeout 3 curl -s localhost:${ServicePort}/ping > /dev/null)
do do
echo "Shutting down localhost:${ServicePort}/__shutdown__ ..." echo "Shutting down localhost:${ServicePort}/__shutdown__ ..."
timeout 10 curl -s localhost:${ServicePort}/__shutdown__ timeout 5 curl -s localhost:${ServicePort}/__shutdown__
sleep 1
pids=$(ps -ef | grep "port=${ServicePort}" | grep "root=${ServiceDir}" | grep -v grep | tr -s ' ' |cut -d' ' -f2)
echo pids=${pids}
if [ "${pids}" != "" ]
then
kill -9 ${pids}
fi
done done
} }