Update fabfile to user global environment configuration, abstracted tasks for platform, webserver and database manager

This commit is contained in:
Roberto Rosario
2012-06-01 01:55:09 -04:00
parent ccf41ae67d
commit 9f0d7966bc
21 changed files with 374 additions and 196 deletions

View File

@@ -0,0 +1,34 @@
import os
from fabric.api import run, sudo, cd, env, task
def install_site():
"""
Install Mayan EDMS's site file in Apache configuration
"""
#TODO: mod site with paths
sudo('cp %s /etc/apache2/sites-available/' % os.path.join(env.repository_path, 'contrib/apache/mayan'))
sudo('a2ensite mayan')
def remove_site():
"""
Install Mayan EDMS's site file from Apache's configuration
"""
sudo('a2dissite mayan')
def restart():
"""
Restart Apache
"""
sudo('/etc/init.d/apache2 restart')
def reload():
"""
Reload Apache configuration files
"""
sudo('/etc/init.d/apache2 reload')