Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
slapos
Commits
32a020df
Commit
32a020df
authored
Feb 15, 2013
by
Cédric de Saint Martin
Committed by
Kazuhiko Shiozaki
Mar 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't touch to custom conf file if already present
parent
b75055a1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
slapos/recipe/apache_frontend/__init__.py
slapos/recipe/apache_frontend/__init__.py
+5
-3
No files found.
slapos/recipe/apache_frontend/__init__.py
View file @
32a020df
...
@@ -543,7 +543,7 @@ class Recipe(BaseSlapRecipe):
...
@@ -543,7 +543,7 @@ class Recipe(BaseSlapRecipe):
self
.
_createDirectory
(
mod_ssl_cache_location
)
self
.
_createDirectory
(
mod_ssl_cache_location
)
# Create "custom" apache configuration files if it does not exist.
# Create "custom" apache configuration files if it does not exist.
# Note : Those files won't be erased or changed
when slapgrid is ran
.
# Note : Those files won't be erased or changed
by slapgrid
.
# It can be freely customized by node admin.
# It can be freely customized by node admin.
custom_apache_configuration_directory
=
os
.
path
.
join
(
custom_apache_configuration_directory
=
os
.
path
.
join
(
self
.
data_root_directory
,
'apache-conf.d'
)
self
.
data_root_directory
,
'apache-conf.d'
)
...
@@ -551,12 +551,14 @@ class Recipe(BaseSlapRecipe):
...
@@ -551,12 +551,14 @@ class Recipe(BaseSlapRecipe):
# First one is included in the end of the apache configuration file
# First one is included in the end of the apache configuration file
custom_apache_configuration_file_location
=
os
.
path
.
join
(
custom_apache_configuration_file_location
=
os
.
path
.
join
(
custom_apache_configuration_directory
,
'apache_frontend.custom.conf'
)
custom_apache_configuration_directory
,
'apache_frontend.custom.conf'
)
open
(
custom_apache_configuration_file_location
,
'a'
)
if
not
os
.
path
.
exists
(
custom_apache_configuration_file_location
):
open
(
custom_apache_configuration_file_location
,
'w'
)
# Second one is included in the virtualhost of apache configuration file
# Second one is included in the virtualhost of apache configuration file
custom_apache_virtual_configuration_file_location
=
os
.
path
.
join
(
custom_apache_virtual_configuration_file_location
=
os
.
path
.
join
(
custom_apache_configuration_directory
,
custom_apache_configuration_directory
,
'apache_frontend.virtualhost.custom.conf'
)
'apache_frontend.virtualhost.custom.conf'
)
open
(
custom_apache_virtual_configuration_file_location
,
'a'
)
if
not
os
.
path
.
exists
(
custom_apache_virtual_configuration_file_location
):
open
(
custom_apache_virtual_configuration_file_location
,
'w'
)
# Create backup of custom apache configuration
# Create backup of custom apache configuration
backup_path
=
self
.
createBackupDirectory
(
'custom_apache_conf_backup'
)
backup_path
=
self
.
createBackupDirectory
(
'custom_apache_conf_backup'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment