X-Git-Url: https://git.mdrn.pl/fnpdjango.git/blobdiff_plain/62132a15d022291be5b5403ed44647566efb8922..c563f6d10350874294468d7c6f23dc5f103791fe:/fnpdjango/deploy/__init__.py diff --git a/fnpdjango/deploy/__init__.py b/fnpdjango/deploy/__init__.py index 50a0d62..e5cf30b 100644 --- a/fnpdjango/deploy/__init__.py +++ b/fnpdjango/deploy/__init__.py @@ -107,8 +107,7 @@ class DebianGunicorn(Task): def run(self): print '>>> restart webserver using gunicorn-debian' - with path('/sbin'): - sudo('gunicorn-debian restart %s' % self.site_name, shell=False) + sudo('gunicorn-debian restart %s' % self.name, shell=False) class Apache(Task): def run(self): @@ -123,8 +122,7 @@ class Supervisord(Task): def run(self): print '>>> supervisord: restart %s' % self.name - with path('/sbin'): - sudo('supervisorctl restart %s' % self.name, shell=False) + sudo('supervisorctl restart %s' % self.name, shell=False) def check_setup(): require('app_path') @@ -209,7 +207,7 @@ def migrate(): "Update the database" print '>>> migrate' require('app_path', 'project_name') - with cd('%(app_path)s/releases/current/%(project_name)s' % env): + with cd('%(app_path)s/releases/current' % env): run('%(app_path)s/ve/bin/python manage.py syncdb --noinput' % env, pty=True) run('%(app_path)s/ve/bin/python manage.py migrate' % env, pty=True) @@ -217,5 +215,5 @@ def collectstatic(): """Collect static files""" print '>>> collectstatic' require('app_path', 'project_name') - with cd('%(app_path)s/releases/current/%(project_name)s' % env): + with cd('%(app_path)s/releases/current' % env): run('%(app_path)s/ve/bin/python manage.py collectstatic --noinput' % env, pty=True)