Ensure the app is really running before killing it
This commit is contained in:
2
dokku
2
dokku
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user