Only re-run 'mkvirtualenv' for backup app, if it doesn't exist
This commit is contained in:
parent
775b0eed29
commit
a1af0b131e
|
@ -78,10 +78,10 @@ def deploy_backup_app(deploy, envname, mkvirtualenv=True, user='rattail',
|
|||
runat = datetime.time(0) # defaults to midnight
|
||||
|
||||
# virtualenv
|
||||
if mkvirtualenv:
|
||||
envpath = '/srv/envs/{}'.format(envname)
|
||||
if mkvirtualenv and not exists(envpath):
|
||||
python.mkvirtualenv(envname, python=python_exe, upgrade_setuptools=False,
|
||||
runas_user=user)
|
||||
envpath = '/srv/envs/{}'.format(envname)
|
||||
sudo('chown -R {}: {}'.format(user, envpath))
|
||||
with cd(envpath):
|
||||
mkdir('src', owner=user)
|
||||
|
|
Loading…
Reference in a new issue