🐛 wait until process is killed and port is free again

This commit is contained in:
Felix Lohmeier 2021-02-25 14:19:07 +01:00
parent d8e3d30e3f
commit 302712853b
1 changed files with 3 additions and 1 deletions

View File

@ -87,7 +87,9 @@ tasks:
dir: ./{{.DIR}}
cmds:
- | # shut down OpenRefine immediately to save time and disk space
kill -9 $(lsof -t -i:{{.PORT}})
PID=$(lsof -t -i:{{.PORT}})
kill -9 $PID
while ps -p $PID > /dev/null; do sleep 1; done
- rm -rf ./*.project* workspace.json # delete temporary files
check: