wrap container id checks and reading into common function that attempts new and old style container id files

aggregate log streams
This commit is contained in:
Michael Hobbs
2015-04-17 18:57:37 -07:00
parent 33f872183e
commit e27d0e6fa5
7 changed files with 80 additions and 44 deletions

View File

@@ -44,8 +44,9 @@ fi
if [[ -z "$DOKKU_APP_LISTEN_IP" ]] && [[ -f "$DOKKU_ROOT/$APP/IP" ]]; then
DOKKU_APP_LISTEN_IP=$(< "$DOKKU_ROOT/$APP/IP")
fi
if [[ -z "$DOKKU_APP_CONTAINER_ID" ]] && [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
DOKKU_APP_CONTAINER_ID=$(< "$DOKKU_ROOT/$APP/CONTAINER")
if [[ -z "$DOKKU_APP_CONTAINER_ID" ]]; then
DOKKU_APP_CIDS=( $(get_container_ids $APP) )
DOKKU_APP_CONTAINER_ID=${DOKKU_APP_CIDS[0]}
fi