cc1
v2.1
CC1 source code docs
Main Page
Related Pages
Packages
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Pages
apache.py
Go to the documentation of this file.
1
import
subprocess
2
import
os
3
4
def
enable
(site):
5
subprocess.call(
'a2enmod ssl'
, shell=
True
)
6
subprocess.call(
'a2dissite default'
, shell=
True
)
7
subprocess.call(
'a2ensite %s'
% site, shell=
True
)
8
subprocess.call(
'a2ensite %s-ci'
% site, shell=
True
)
9
subprocess.call(
'a2ensite %s-ctx'
% site, shell=
True
)
10
subprocess.call(
'a2ensite %s-ec2ctx'
% site, shell=
True
)
11
subprocess.call(
'service apache2 restart'
, shell=
True
)
12
return
0
13
14
def
disable
(site):
15
subprocess.call(
'a2dissite %s'
% site, shell=
True
)
16
subprocess.call(
'a2dissite %s-ci'
% site, shell=
True
)
17
subprocess.call(
'a2dissite %s-ctx'
% site, shell=
True
)
18
subprocess.call(
'a2dissite %s-ec2ctx'
% site, shell=
True
)
19
subprocess.call(
'service apache2 restart'
, shell=
True
)
20
return
0
21
22
def
purge
(site):
23
disable
(site)
24
os.remove(
'/etc/apache2/sites-available/%s'
% site)
25
common
tools
apache.py
Generated on Wed Jun 18 2014 13:33:05 for cc1 by
1.8.1.2