Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/nginx/manifests/init.pp

Issue 29344646: Issue 4073 - Improve Nginx integration with "upstart" service provider (Closed)
Patch Set: Issue 4073 - Address feedback from code-review Created May 27, 2016, 4:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class nginx ( 1 class nginx (
2 $worker_processes = $nginx::params::worker_processes, 2 $worker_processes = $nginx::params::worker_processes,
3 $worker_connections = $nginx::params::worker_connections, 3 $worker_connections = $nginx::params::worker_connections,
4 $ssl_session_cache = $nginx::params::ssl_session_cache, 4 $ssl_session_cache = $nginx::params::ssl_session_cache,
5 $geoip_country = undef, 5 $geoip_country = undef,
6 $geoip_city = undef, 6 $geoip_city = undef,
7 ) inherits nginx::params { 7 ) inherits nginx::params {
8 8
9 apt::ppa {'ppa:nginx/stable': 9 apt::ppa {'ppa:nginx/stable':
10 } 10 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 $find_chmod_base = [$find_cmd_base, '-not', '-perm', '0640'] 190 $find_chmod_base = [$find_cmd_base, '-not', '-perm', '0640']
191 $find_chmod_exec = ['-ls', '-exec', 'chmod', '0640', '{}', ';'] 191 $find_chmod_exec = ['-ls', '-exec', 'chmod', '0640', '{}', ';']
192 192
193 exec {"set_logfiles_permissions": 193 exec {"set_logfiles_permissions":
194 command => shellquote($find_chmod_base, $find_chmod_exec), 194 command => shellquote($find_chmod_base, $find_chmod_exec),
195 unless => shellquote($find_chmod_base, $find_kill_exec), 195 unless => shellquote($find_chmod_base, $find_kill_exec),
196 subscribe => Service['nginx'], 196 subscribe => Service['nginx'],
197 } 197 }
198 198
199 $restart_command = join([
200 'set -e',
201 'pid=`cat /var/run/nginx.pid`',
202 'kill -USR2 "$pid"',
203 'sleep 2',
204 'kill -QUIT "$pid"',
205 ], "\n")
206
199 service {'nginx': 207 service {'nginx':
200 ensure => running, 208 ensure => running,
201 enable => true, 209 enable => true,
202 restart => '/etc/init.d/nginx reload', 210 restart => $restart_command,
203 hasstatus => true, 211 hasstatus => true,
204 require => File['/etc/nginx/nginx.conf'] 212 require => Package['nginx'],
205 } 213 }
206 214
207 file {'/usr/share/nginx/html/50x.html': 215 file {'/usr/share/nginx/html/50x.html':
208 mode => 0644, 216 mode => 0644,
209 owner => 'root', 217 owner => 'root',
210 require => Package['nginx'], 218 require => Package['nginx'],
211 source => 'puppet:///modules/nginx/50x.html', 219 source => 'puppet:///modules/nginx/50x.html',
212 } 220 }
213 } 221 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld