Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: df16ade7ca
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (23 sloc) 0.815 kb
#!/usr/bin/env python
#-*- coding: utf-8 -*-
from dbconf import *
import database as db
import os
import re
confs = db.query("""SELECT, websites.config, users.login
FROM domains, websites, users
WHERE = websites.id_domains
AND = websites.id_users
AND websites.enabled = 'yes'""")
for conf in confs:
path = '/home/%s/%s' % (conf.login,
log_path = '/home/%s/logs/%s' % (conf.login,
os.system('mkdir -p "%s"' % log_path)
os.system('chown -R %s:www-data "/home/%s/logs/"' % (conf.login, conf.login))
os.system('chmod -R ug+rwx,o-rwx "/home/%s/logs/"' % conf.login)
print """
$HTTP["host"] == "%s" {
server.document-root = "%s/"
accesslog.filename = "%s/access.log"
}""" % (, path, log_path, re.sub("\n", "\n\t", conf.config))
Jump to Line
Something went wrong with that request. Please try again.