Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added fab commands to control Apache and memcached.

  • Loading branch information...
commit 8244280e30fcdad025482a224c32dd66f02043e2 1 parent d585fb3
@jacobian jacobian authored
Showing with 15 additions and 4 deletions.
  1. +15 −4 fabfile.py
View
19 fabfile.py
@@ -20,16 +20,27 @@ def deploy():
"""
deploy_code()
update_dependencies()
- # migrate()
- # apache("restart")
- # memcached("restart")
+ apache("restart")
+ memcached("restart")
def quick_deploy():
"""
Quick deploy: new code and an in-place reload.
"""
deploy_code()
- # apache("reload")
+ apache("reload")
+
+def apache(cmd):
+ """
+ Manage the apache service. For example, `fab apache:restart`.
+ """
+ sudo('invoke-rc.d apache2 %s' % cmd)
+
+def memcached(cmd):
+ """
+ Manage the memcached service. For example, `fab apache:restart`.
+ """
+ sudo('invoke-rc.d memcached %s' % cmd)
def deploy_code(ref=None):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.