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 %}