wcsinstd: generate apache vhost configuration file
This commit is contained in:
parent
d24a398daa
commit
585100d2cc
|
@ -152,7 +152,15 @@ class DeployInstance(object):
|
|||
|
||||
|
||||
def make_apache_vhost(self):
|
||||
pass
|
||||
apache_vhost_template_path = os.path.join(self.skel_dir, 'apache-vhost.conf')
|
||||
if not os.path.exists(apache_vhost_template_path):
|
||||
return
|
||||
apache_vhost_template = file(apache_vhost_template_path).read()
|
||||
apache_dir = os.path.join(settings.MEDIA_ROOT, 'vhosts.d')
|
||||
if not os.path.exists(apache_dir):
|
||||
os.mkdir(apache_dir)
|
||||
file(os.path.join(apache_dir, '%s.conf' % self.domain), 'w').write(
|
||||
string.Template(apache_vhost_template).substitute({'domain': self.domain}))
|
||||
|
||||
|
||||
def reload_apache(self):
|
||||
|
|
Reference in New Issue