Commit cadd97e9 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

apache-frontend: Add logrotate for apaches and squid

parent 9e72f351
...@@ -20,7 +20,8 @@ context = ...@@ -20,7 +20,8 @@ context =
template = {{ template_slave_configuration }} template = {{ template_slave_configuration }}
filename = {{ '%s.conf' % slave_reference }} filename = {{ '%s.conf' % slave_reference }}
extra-context = extra-context =
section slave_parameter {{ 'slave-instance-%s-configuration' % slave_reference }} key apache_custom_https {{ 'slave-instance-%s-configuration:apache_custom_https' % slave_reference }}
key apache_custom_http {{ 'slave-instance-%s-configuration:apache_custom_http' % slave_reference }}
raw https_port {{ https_port }} raw https_port {{ https_port }}
raw http_port {{ http_port }} raw http_port {{ http_port }}
{{ '\n' }} {{ '\n' }}
......
...@@ -9,6 +9,8 @@ parts = ...@@ -9,6 +9,8 @@ parts =
certificate-authority certificate-authority
squid-cache squid-cache
logrotate-entry-apache logrotate-entry-apache
logrotate-entry-apache-cached
logrotate-entry-squid
apache-frontend apache-frontend
apache-cached apache-cached
switch-softwaretype switch-softwaretype
...@@ -53,7 +55,7 @@ squid-cache = $${:srv}/squid_cache ...@@ -53,7 +55,7 @@ squid-cache = $${:srv}/squid_cache
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = $${dynamic-custom-template-slave-list:rendered} default = $${dynamic-template-slave-list:rendered}
[instance-parameter] [instance-parameter]
# Fetches parameters defined in SlapOS Master for this instance. # Fetches parameters defined in SlapOS Master for this instance.
...@@ -104,7 +106,6 @@ extra-context = ...@@ -104,7 +106,6 @@ extra-context =
raw template_slave_configuration ${template-slave-configuration:target} raw template_slave_configuration ${template-slave-configuration:target}
raw template_rewrite_cached ${template-rewrite-cached:target} raw template_rewrite_cached ${template-rewrite-cached:target}
[dynamic-custom-template-slave-list] [dynamic-custom-template-slave-list]
< = jinja2-template-base < = jinja2-template-base
template = ${template-custom-slave-list:target} template = ${template-custom-slave-list:target}
...@@ -312,6 +313,30 @@ sharedscripts = true ...@@ -312,6 +313,30 @@ sharedscripts = true
notifempty = true notifempty = true
create = true create = true
[logrotate-entry-apache-cached]
<= logrotate
recipe = slapos.cookbook:logrotate.d
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
sharedscripts = true
notifempty = true
create = true
[logrotate-entry-squid]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = squid
log = $${squid-cache:cache-log-path} $${squid-cache:access-log-path}
frequency = daily
rotatep-num = 30
post = ${buildout:bin-directory}/killpidfromfile $${apache-configuration:pid-file} SIGHUP
sharedscripts = true
notifempty = true
create = true
[squid-cache] [squid-cache]
recipe = slapos.cookbook:squid recipe = slapos.cookbook:squid
prepare-path = $${directory:service}/squid-prepare prepare-path = $${directory:service}/squid-prepare
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment