Update fabfile to place installation marker
This commit is contained in:
Binary file not shown.
@@ -68,3 +68,5 @@ DEFAULT_WEBSERVER = WEB_APACHE
|
||||
DEFAULT_DATABASE_USERNAME = 'mayan'
|
||||
DEFAULT_DATABASE_HOST = '127.0.0.1'
|
||||
DEFAULT_PASSWORD_LENGTH = 10
|
||||
|
||||
FABFILE_MARKER = 'fabfile_install'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import os
|
||||
|
||||
from fabric.api import run, sudo, cd, env, task
|
||||
from fabric.colors import green
|
||||
|
||||
@@ -7,10 +5,6 @@ from ..literals import OS_UBUNTU, OS_FEDORA, OS_DEBIAN
|
||||
from ..conf import setup_environment
|
||||
import linux, ubuntu, fedora, debian
|
||||
|
||||
def touch(fname, times = None):
|
||||
with file(fname, 'a'):
|
||||
os.utime(fname, times)
|
||||
|
||||
|
||||
@task
|
||||
def install_dependencies():
|
||||
@@ -100,10 +94,10 @@ def post_install():
|
||||
setup_environment()
|
||||
if env.os == OS_UBUNTU:
|
||||
ubuntu.post_install()
|
||||
linux.post_install()
|
||||
elif env.os == OS_FEDORA:
|
||||
fedora.post_install()
|
||||
linux.post_install()
|
||||
elif env.os == OS_DEBIAN:
|
||||
debian.post_install()
|
||||
|
||||
fabfile_marker = os.path.join(env.repository_path, 'fabfile_install')
|
||||
touch(fabfile_marker)
|
||||
linux.post_install()
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
import os
|
||||
|
||||
from fabric.api import run, sudo, cd, env, task, settings
|
||||
|
||||
from ..literals import FABFILE_MARKER
|
||||
|
||||
|
||||
def delete_mayan():
|
||||
"""
|
||||
Delete Mayan EDMS files from an Ubuntu system
|
||||
Delete Mayan EDMS files from a Linux system
|
||||
"""
|
||||
sudo('rm %(virtualenv_path)s -Rf' % env)
|
||||
|
||||
|
||||
def install_mayan():
|
||||
"""
|
||||
Install Mayan EDMS on an Ubuntu system
|
||||
Install Mayan EDMS on a Linux system
|
||||
"""
|
||||
with cd(env.install_path):
|
||||
sudo('virtualenv --no-site-packages %(virtualenv_name)s' % env)
|
||||
@@ -18,3 +22,13 @@ def install_mayan():
|
||||
with cd(env.virtualenv_path):
|
||||
sudo('git clone git://github.com/rosarior/mayan.git %(repository_name)s' % env)
|
||||
sudo('source bin/activate; pip install -r %(repository_name)s/requirements/production.txt' % env)
|
||||
|
||||
|
||||
def post_install():
|
||||
"""
|
||||
Post install process on a Linux systems
|
||||
"""
|
||||
fabfile_marker = os.path.join(env.repository_path, FABFILE_MARKER)
|
||||
sudo('touch %s' % fabfile_marker)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user