Ensure the app is really running before killing it

This commit is contained in:
Elia Schito committed 2014-03-07 00:54:54 +01:00
1 parent 7fc7a46ed3
commit b1267ebf56
1 file changed
+1 -1
+1 -1
View File
@@ -60,7 +60,7 @@ case "$1" in
# kill the app when running # kill the app when running
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
oldid=$(< "$DOKKU_ROOT/$APP/CONTAINER") oldid=$(< "$DOKKU_ROOT/$APP/CONTAINER")
docker kill $oldid > /dev/null 2>&1 || true docker inspect $oldid &> /dev/null && docker kill $oldid > /dev/null
fi fi
# start the app # start the app