summaryrefslogtreecommitdiff
path: root/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog
blob: a90610d51c4511bba5ca6e824979b6472c4c47da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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 $?
    if [ "x$NAME" = "xflog_nginx" ]; then
       ${PING_CHECK} flog_app.docker
       exit $?
    fi
    exit 0
fi