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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
isaak yansane-sisk
slapos
Commits
31661c3f
Commit
31661c3f
authored
Feb 15, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't touch to custom conf file if already present
parent
ba7bcb51
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 @
31661c3f
...
...
@@ -543,7 +543,7 @@ class Recipe(BaseSlapRecipe):
self
.
_createDirectory
(
mod_ssl_cache_location
)
# 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.
custom_apache_configuration_directory
=
os
.
path
.
join
(
self
.
data_root_directory
,
'apache-conf.d'
)
...
...
@@ -551,12 +551,14 @@ class Recipe(BaseSlapRecipe):
# First one is included in the end of the apache configuration file
custom_apache_configuration_file_location
=
os
.
path
.
join
(
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
custom_apache_virtual_configuration_file_location
=
os
.
path
.
join
(
custom_apache_configuration_directory
,
'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
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