Ensure the app is really running before killing it

This commit is contained in:
Elia Schito
2014-03-06 18:03:06 +01:00
parent 7fc7a46ed3
commit b1267ebf56

2
dokku
View File

@@ -60,7 +60,7 @@ case "$1" in
# kill the app when running
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
oldid=$(< "$DOKKU_ROOT/$APP/CONTAINER")
docker kill $oldid > /dev/null 2>&1 || true
docker inspect $oldid &> /dev/null && docker kill $oldid > /dev/null
fi
# start the app