fabulator / src / fabulator / core / http /

Full commit
# -*- coding: latin-1 -*-
    base class for web servers management

class BaseHTTP(object):

    def __init__(self, conf, env):
        self.conf = conf
        self.env = env

    def install_vhost(self, vhost_name):
        """Install the vhost for your http webserver"""
        raise NotImplementedError

    def rc(self, service_name, rc_name=None, command="start", require_space=None):
        """manage the daemon using system RC"""
        rc_name = rc_name or "/etc/init.d/"
        service_name = service_name or "nginx"
        if require_space:
            sudo("%s %s %s" % (rc_name, service_name, command))
        sudo("%s/%s %s" % (rc_name, service_name, command))