From a441b737ad5b17203123f26034c846af3dca4100 Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Wed, 15 Apr 2015 16:15:33 +0200 Subject: Changed ping-check to be run with run-parts --- .../overlay/usr/local/etc/docker.d/30flog | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog (limited to 'sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d') diff --git a/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog b/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog new file mode 100755 index 0000000..a90610d --- /dev/null +++ b/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog @@ -0,0 +1,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 -- cgit v1.1 From a1f6be0730d25fd6f4ecff0d91bc75a8a250c0fe Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Wed, 15 Apr 2015 16:29:46 +0200 Subject: Bash skillz lacking... --- sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog | 1 + 1 file changed, 1 insertion(+) (limited to 'sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d') diff --git a/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog b/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog index a90610d..2b477a2 100755 --- a/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog +++ b/sto-tug-kvm2.swamid.se/overlay/usr/local/etc/docker.d/30flog @@ -12,6 +12,7 @@ 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 $? -- cgit v1.1