Skip to content

Instantly share code, notes, and snippets.

@kmike
Created June 25, 2012 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmike/2987864 to your computer and use it in GitHub Desktop.
Save kmike/2987864 to your computer and use it in GitHub Desktop.
@task
@utils.run_as_sudo
def from_07_to_08():
question = """
This task updates server from django-fab-deploy 0.7.x to 0.8.x:
it prepares the server and updates apache.conf and nginx.conf.
Before upgrading please make sure that:
1) {{ APACHE_PORT }} are replaced with {{ PORTS['apache'] }}
in all your apache.conf and nginx.conf files;
2) you've added "Listen 127.0.0.1:{{ PORTS['apache'] }}" directive
to the top of your apache.conf.
Do you wish to upgrade?
"""
if not console.confirm(question, default=False):
abort('Aborting.')
system.install_software()
# FIXME: rename & unify these tasks
apache.make_config()
nginx.setup()
apache.restart()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment