summaryrefslogtreecommitdiff
path: root/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog
blob: 2b477a2f3551be50445ed7e1afd9e760002b785e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#
# Wait for dependent flog docker containers to be registered in local DNS.
#

PING_CHECK="/usr/local/bin/ping-check"

logtag="flog_docker_pre-post[$ACTION]"
logger -t "${logtag}" "$NAME ($IMAGE), CID: '$CID'"

if [ "x$ACTION" = "xpre-start" ]; then
    if [ "x$NAME" = "xflog_app" ]; then
       ${PING_CHECK} flog_db.docker
       exit $?
    fi
    if [ "x$NAME" = "xflog_nginx" ]; then
       ${PING_CHECK} flog_app.docker
       exit $?
    fi
    exit 0
fi