From 825faebdbedf4732786a0f129d3eae7208ff90a3 Mon Sep 17 00:00:00 2001 From: "A. Svensson" Date: Sun, 8 Mar 2015 19:12:07 +0100 Subject: [PATCH] Added an extra check to the fab file. --- fabfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fabfile.py b/fabfile.py index 8c18038..343bcf7 100644 --- a/fabfile.py +++ b/fabfile.py @@ -64,7 +64,8 @@ def migrate(): @task def init_supervisor(): - if exists('/etc/supervisor/conf.d/'): + if (exists('/etc/supervisor/conf.d/') and + not exists('/etc/supervisor/conf.d/{}.conf'.format(env.project))): sudo('cp {}/supervisor.conf /etc/supervisor/conf.d/{}.conf'.format( env.repo_path, env.project)) sudo('supervisorctl reread')