示例#1
0
    help_text=("Base domain name used for other settings.<br>"
               "If you're editing the settings via the admin interface <b>it is advisable to "
               "commit this change before changing any other variables which could be affected</b>.")
)


ORCHESTRA_SITE_URL = Setting('ORCHESTRA_SITE_URL',
    'https://orchestra.%s' % ORCHESTRA_BASE_DOMAIN,
    help_text=_("Domain name used when it will not be possible to infere the domain from a request."
                "For example in periodic tasks.<br>"
                "Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.")
)


ORCHESTRA_SITE_NAME = Setting('ORCHESTRA_SITE_NAME',
    'orchestra',
)


ORCHESTRA_SITE_VERBOSE_NAME = Setting('ORCHESTRA_SITE_VERBOSE_NAME',
    "%s Hosting Management" % ORCHESTRA_SITE_NAME.capitalize(),
    help_text="Uses <tt>ORCHESTRA_SITE_NAME</tt> by default."
)


# Service management commands

ORCHESTRA_START_SERVICES = Setting('ORCHESTRA_START_SERVICES',
    default=(
        'postgresql',
#        'celeryevcam',
示例#2
0
from orchestra.contrib.settings import Setting
from orchestra.settings import ORCHESTRA_BASE_DOMAIN

from .. import webapps


_names = ("home", "user", "group", "app_type", "app_name", "app_type", "app_id")
_php_names = _names + ("php_version", "php_version_number")
_python_names = _names + ("python_version", "python_version_number")


WEBAPPS_BASE_DIR = Setting(
    "WEBAPPS_BASE_DIR",
    "%(home)s/webapps/%(app_name)s",
    help_text="Available fromat names: <tt>%s</tt>" % ", ".join(_names),
    validators=[Setting.string_format_validator(_names)],
)


WEBAPPS_FPM_LISTEN = Setting(
    "WEBAPPS_FPM_LISTEN",
    "/opt/php/5.4/socks/%(user)s-%(app_name)s.sock",
    help_text=("TCP socket example: <tt>127.0.0.1:9%(app_id)03d</tt><br>" "Available fromat names: <tt>{}</tt>").format(
        ", ".join(_php_names)
    ),
    validators=[Setting.string_format_validator(_php_names)],
)


WEBAPPS_FPM_DEFAULT_MAX_CHILDREN = Setting("WEBAPPS_FPM_DEFAULT_MAX_CHILDREN", 3)
示例#3
0
from django.utils.translation import ugettext_lazy as _

from orchestra.contrib.settings import Setting
from orchestra.core.validators import validate_ip_address

from .. import websites


_names = ('id', 'pk', 'home', 'user', 'group', 'site_name', 'protocol')
_log_names = _names + ('unique_name',)


WEBSITES_UNIQUE_NAME_FORMAT = Setting('WEBSITES_UNIQUE_NAME_FORMAT',
    default='%(user)s-%(site_name)s',
    help_text="Available fromat names: <tt>%s</tt>" % ', '.join(_names),
    validators=[Setting.string_format_validator(_names)],
)


WEBSITES_PROTOCOL_CHOICES = Setting('WEBSITES_PROTOCOL_CHOICES',
    default=(
        ('http', "HTTP"),
        ('https', "HTTPS"),
        ('http/https', _("HTTP and HTTPS")),
        ('https-only', _("HTTPS only")),
    ),
    validators=[Setting.validate_choices]
)


WEBSITES_DEFAULT_PROTOCOL = Setting('WEBSITES_DEFAULT_PROTOCOL',
示例#4
0
_names = ('name', 'username',)
_backend_names = _names + ('user', 'group', 'home')
mark_safe_lazy = lazy(mark_safe, str)


MAILBOXES_DOMAIN_MODEL = Setting('MAILBOXES_DOMAIN_MODEL', 'domains.Domain',
    validators=[Setting.validate_model_label]
)


MAILBOXES_HOME = Setting('MAILBOXES_HOME',
    '/home/%(name)s',
    help_text="Available fromat names: <tt>%s</tt>" % ', '.join(_names),
    validators=[Setting.string_format_validator(_names)],
)


MAILBOXES_SIEVE_PATH = Setting('MAILBOXES_SIEVE_PATH',
    os.path.join('%(home)s/sieve/orchestra.sieve'),
    help_text="If you are using Dovecot you can use "
        "<a href='http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#line-130'>"
        "<tt>sieve_before</tt></a> in order to make sure orchestra sieve script is exectued."
        "<br>Available fromat names: <tt>%s</tt>" % ', '.join(_names),
    validators=[Setting.string_format_validator(_backend_names)],
)


MAILBOXES_SIEVETEST_PATH = Setting('MAILBOXES_SIEVETEST_PATH',
    '/dev/shm'
示例#5
0
    choices=SYSTEMUSERS_SHELLS
)


SYSTEMUSERS_DISABLED_SHELLS = Setting('SYSTEMUSERS_DISABLED_SHELLS',
    default=(
        '/dev/null',
        '/bin/rssh',
    ),
)


SYSTEMUSERS_HOME = Setting('SYSTEMUSERS_HOME',
    '/home/%(user)s',
    help_text="Available fromat names: <tt>%s</tt>" % ', '.join(_names),
    validators=[Setting.string_format_validator(_names)],
)


SYSTEMUSERS_FTP_LOG_PATH = Setting('SYSTEMUSERS_FTP_LOG_PATH',
    '/var/log/vsftpd.log'
)


SYSTEMUSERS_MAIL_LOG_PATH = Setting('SYSTEMUSERS_MAIL_LOG_PATH',
    '/var/log/exim4/mainlog'
)

SYSTEMUSERS_DEFAULT_GROUP_MEMBERS = Setting('SYSTEMUSERS_DEFAULT_GROUP_MEMBERS',
    ('www-data',)
)