random fixes¡
This commit is contained in:
parent
1e8e57c979
commit
b6a168390f
11
INSTALL.md
11
INSTALL.md
|
@ -76,3 +76,14 @@ Additionally the following command can be used in order to determine the current
|
|||
python manage.py orchestraversion
|
||||
```
|
||||
|
||||
|
||||
|
||||
Extra
|
||||
=====
|
||||
|
||||
1. Generate a passwordless ssh key for orchestra user
|
||||
ssh-keygen
|
||||
|
||||
2. Copy this key to all servers orchestra will manage, including itself is neccessary
|
||||
ssh-copy-id root@<server-address>
|
||||
|
||||
|
|
|
@ -45,10 +45,13 @@ class Bind9MasterDomainBackend(ServiceController):
|
|||
self.delete_conf(context)
|
||||
|
||||
def delete_conf(self, context):
|
||||
if context['name'][0] in ('*', '_'):
|
||||
# These can never be top level domains
|
||||
return
|
||||
self.append(textwrap.dedent("""
|
||||
awk -v s=%(name)s 'BEGIN {
|
||||
RS=""; s="zone \\""s"\\""
|
||||
} $0!~s{ print $0"\\n" }' %(conf_path)s > %(conf_path)s.tmp""" % context
|
||||
cat -s <(sed -e 's/^};/};\n/' named.conf.local) | \
|
||||
awk -v s="%(name)s" 'BEGIN { RS=""; s="zone \""s"\"" } $0!~s{ print $0"\n" }' \
|
||||
> %(conf_path)s.tmp""" % context
|
||||
))
|
||||
self.append('diff -I"^\s*//" %(conf_path)s.tmp %(conf_path)s || UPDATED=1' % context)
|
||||
self.append('mv %(conf_path)s.tmp %(conf_path)s' % context)
|
||||
|
|
|
@ -67,6 +67,7 @@ class SystemUser(models.Model):
|
|||
basehome = basehome.replace('/./', '/')
|
||||
home = os.path.join(basehome, self.home)
|
||||
# Chrooting
|
||||
# TODO option for disabling chrooting
|
||||
home = home.split('/')
|
||||
home.insert(-2, '.')
|
||||
return '/'.join(home)
|
||||
|
|
|
@ -33,7 +33,7 @@ class PHPFcgidBackend(WebAppServiceMixin, ServiceController):
|
|||
|
||||
def commit(self):
|
||||
super(PHPFcgidBackend, self).commit()
|
||||
self.append("[[ $UPDATED_APACHE == 1 ]] && { /etc/init.d/apache reload; }")
|
||||
self.append("[[ $UPDATED_APACHE == 1 ]] && { service apache2 reload; }")
|
||||
|
||||
def get_context(self, webapp):
|
||||
context = super(PHPFcgidBackend, self).get_context(webapp)
|
||||
|
@ -50,8 +50,7 @@ class PHPFcgidBackend(WebAppServiceMixin, ServiceController):
|
|||
#!/bin/sh
|
||||
# %(banner)s
|
||||
export PHPRC=/etc/%(type)s/cgi/
|
||||
exec /usr/bin/%(type)s-cgi %(init_vars)s
|
||||
""" % context),
|
||||
exec /usr/bin/%(type)s-cgi %(init_vars)s""" % context),
|
||||
'wrapper_path': wrapper_path,
|
||||
'wrapper_dir': os.path.dirname(wrapper_path),
|
||||
})
|
||||
|
|
|
@ -2,6 +2,7 @@ from django.conf import settings
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
# TODO make '%(mainuser_home)s/webapps...
|
||||
WEBAPPS_BASE_ROOT = getattr(settings, 'WEBAPPS_BASE_ROOT', '/home/%(user)s/webapps/%(app_name)s/')
|
||||
|
||||
|
||||
|
@ -30,8 +31,8 @@ WEBAPPS_TYPES = getattr(settings, 'WEBAPPS_TYPES', {
|
|||
_("This creates a PHP5.5 application under ~/webapps/<app_name>\n"
|
||||
"PHP-FPM will be used to execute PHP files.")
|
||||
),
|
||||
'php5': (
|
||||
_("PHP 5"),
|
||||
'php5.2': (
|
||||
_("PHP 5.2"),
|
||||
'fcgid', (WEBAPPS_FCGID_PATH,),
|
||||
_("This creates a PHP5.2 application under ~/webapps/<app_name>\n"
|
||||
"Apache-mod-fcgid will be used to execute PHP files.")
|
||||
|
|
|
@ -18,6 +18,10 @@ echo "from orchestra.apps.accounts.models import Account"
|
|||
echo "account = Account.objects.get(pk=1)"
|
||||
ERRORS=""
|
||||
while read name; do
|
||||
[[ -f $name ]] && {
|
||||
ZONE_PATH=${name%/*}
|
||||
name=${name##*/}
|
||||
}
|
||||
ZONE=$(named-checkzone -D $name ${ZONE_PATH}/$name)
|
||||
if [[ $? != 0 ]]; then
|
||||
ERRORS="${ERRORS} $name"
|
||||
|
|
Loading…
Reference in a new issue