From 80a2a985e96b2d7c9867660f15a5e7a9808ee156 Mon Sep 17 00:00:00 2001 From: Chad Bean Date: Wed, 22 Jan 2020 10:34:43 -0500 Subject: [PATCH] fix: avoid setting multiple pre-start stanzas in upstart --- docker/files/upstart.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/files/upstart.conf b/docker/files/upstart.conf index a879ab44..defd6868 100644 --- a/docker/files/upstart.conf +++ b/docker/files/upstart.conf @@ -13,15 +13,15 @@ respawn {%- set pull_before_start = container.get("pull_before_start") or False %} {%- set remove_before_start = container.get("remove_before_start") or False %} -{%- if pull_before_start %} +{%- if pull_before_start or remove_before_start -%} pre-start script +{%- if pull_before_start %} /usr/bin/docker pull {{ container.image }} -end script {%- endif %} {%- if remove_before_start %} -pre-start script /usr/bin/docker rm -f {{ name }} +{%- endif %} end script {%- endif %}