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
Valentin Benozillo
slapos
Commits
637eb6bc
Commit
637eb6bc
authored
Apr 15, 2014
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apache-frontend: check configuration file before reloading apache
parent
29591f85
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
12 deletions
+28
-12
software/apache-frontend/common.cfg
software/apache-frontend/common.cfg
+9
-3
software/apache-frontend/instance-apache-frontend.cfg
software/apache-frontend/instance-apache-frontend.cfg
+16
-8
software/apache-frontend/templates/apache-custom-slave-list.cfg.in
...apache-frontend/templates/apache-custom-slave-list.cfg.in
+1
-1
software/apache-frontend/templates/wrapper.in
software/apache-frontend/templates/wrapper.in
+2
-0
No files found.
software/apache-frontend/common.cfg
View file @
637eb6bc
...
...
@@ -59,7 +59,7 @@ mode = 0644
[template-apache-frontend]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-frontend.cfg
md5sum = f0a507fed2b1dcab5530c892adce8327
#
md5sum = f0a507fed2b1dcab5530c892adce8327
output = ${buildout:directory}/template-apache-frontend.cfg
mode = 0644
...
...
@@ -72,7 +72,7 @@ mode = 0644
[template-slave-list]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/apache-custom-slave-list.cfg.in
md5sum = f002a8fc8fc5d18adbd8ac1ee054e852
#
md5sum = f002a8fc8fc5d18adbd8ac1ee054e852
mode = 640
[template-slave-configuration]
...
...
@@ -139,11 +139,17 @@ mode = 640
[template-squid-configuration]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/squid.conf.jinja2
md5sum = 484fee19b2ca102f2baf3bd04893dd2c
#
md5sum = 484fee19b2ca102f2baf3bd04893dd2c
mode = 640
[template-empty]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/empty.in
md5sum = c2314c3a9c3412a38d14b312d3df83c1
mode = 640
[template-wrapper]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/wrapper.in
#md5sum = c2314c3a9c3412a38d14b312d3df83c1
mode = 640
\ No newline at end of file
software/apache-frontend/instance-apache-frontend.cfg
View file @
637eb6bc
...
...
@@ -292,6 +292,8 @@ pid-file = $${directory:run}/httpd.pid
protected-path = /
access-control-string = none
cached-rewrite-file = $${directory:etc}/apache_rewrite_cached.txt
frontend-graceful-command = ${apache-2.2:location}/bin/httpd -Sf $${:frontend-configuration}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${:pid-file}); fi
cached-graceful-command = ${apache-2.2:location}/bin/httpd -Sf $${:cached-configuration}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${apache-configuration:cache-pid-file}); fi
# Apache for cache configuration
cache-access-log = $${directory:log}/frontend-apache-access-cached.log
...
...
@@ -381,7 +383,7 @@ name = apache
log = $${apache-configuration:error-log} $${apache-configuration:access-log}
frequency = daily
rotatep-num = 30
post = $
{buildout:bin-directory}/killpidfromfile $${apache-configuration:pid-file} SIGUSR1
post = $
${apache-configuration:frontend-graceful-command}
sharedscripts = true
notifempty = true
create = true
...
...
@@ -393,7 +395,7 @@ name = apache-cached
log = $${apache-configuration:cache-error-log} $${apache-configuration:cache-access-log}
frequency = daily
rotatep-num = 30
post = $
{buildout:bin-directory}/killpidfromfile $${apache-configuration:cache-pid-file} SIGUSR1
post = $
${apache-configuration:cached-graceful-command}
sharedscripts = true
notifempty = true
create = true
...
...
@@ -471,14 +473,20 @@ port = $${apache-configuration:cache-port}
# End of Squid part
[frontend-apache-graceful]
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/killpidfromfile $${apache-configuration:pid-file} SIGUSR1
wrapper-path = $${directory:etc-run}/frontend-apache-graceful
< = jinja2-template-base
template = ${template-wrapper:target}
rendered = $${directory:etc-run}/frontend-apache-safe-graceful
mode = 0700
extra-context =
key content apache-configuration:frontend-graceful-command
[cached-apache-graceful]
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/killpidfromfile $${apache-configuration:cache-pid-file} SIGUSR1
wrapper-path = $${directory:etc-run}/cached-apache-graceful
< = jinja2-template-base
template = ${template-wrapper:target}
rendered = $${directory:etc-run}/cached-apache-safe-graceful
mode = 0700
extra-context =
key content apache-configuration:cached-graceful-command
[promise-apache-frontend-v4-https]
recipe = slapos.cookbook:check_port_listening
...
...
software/apache-frontend/templates/apache-custom-slave-list.cfg.in
View file @
637eb6bc
...
...
@@ -53,7 +53,7 @@ log = {{slave_parameter_dict.get('access_log')}} {{slave_parameter_dict.get('err
backup = {{ '${' + slave_directory_section + ':log-folder}' }}
frequency = daily
rotatep-num = 30
post =
${buildout:bin-directory}/killpidfromfile {{ apache_configuration.get('pid-file') }} SIGUSR1
post =
{{ apache_configuration.get('frontend-graceful-command') }}
sharedscripts = true
notifempty = true
create = true
...
...
software/apache-frontend/templates/wrapper.in
0 → 100644
View file @
637eb6bc
#!/bin/sh
{{
content
}}
\ No newline at end of file
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