From 7a5244bf7c5b4fb486de5c69b31e772626d4c5ad Mon Sep 17 00:00:00 2001 From: Dominique Roux Date: Wed, 21 Dec 2016 23:03:24 +0100 Subject: [PATCH] Bugfixed __docker_compose: If docker-compose is already running, curl won't override the binary I add an if the file does not exist before download --- cdist/conf/type/__docker_compose/gencode-remote | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cdist/conf/type/__docker_compose/gencode-remote b/cdist/conf/type/__docker_compose/gencode-remote index f22823d3..3f2fb940 100644 --- a/cdist/conf/type/__docker_compose/gencode-remote +++ b/cdist/conf/type/__docker_compose/gencode-remote @@ -22,7 +22,6 @@ version="$(cat "$__object/parameter/version")" # Download docker-compose file -echo 'curl -L "https://github.com/docker/compose/releases/download/'${version}'/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose' - + echo 'if [ ! -e /usr/local/bin/docker-compose ]; then curl -L "https://github.com/docker/compose/releases/download/'${version}'/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose ; fi' # Change permissions echo 'chmod +x /usr/local/bin/docker-compose'