| Index: modules/nginx/manifests/init.pp |
| diff --git a/modules/nginx/manifests/init.pp b/modules/nginx/manifests/init.pp |
| index a6b3d85540ac791163bc20c7578d92179b4648db..7e3b09a7dd05ce2ab047d6f96919c3b02f919096 100644 |
| --- a/modules/nginx/manifests/init.pp |
| +++ b/modules/nginx/manifests/init.pp |
| @@ -47,7 +47,6 @@ class nginx ( |
| file {'/etc/nginx/nginx.conf': |
| content => template('nginx/nginx.conf.erb'), |
| require => Package['nginx'], |
| - notify => Service['nginx'] |
| } |
| file {'/etc/nginx/sites-available': |
| @@ -196,12 +195,21 @@ class nginx ( |
| subscribe => Service['nginx'], |
| } |
| + $restart_command = join([ |
| + 'set -e', |
| + 'pid=`cat /var/run/nginx.pid`', |
| + 'kill -USR2 "$pid"', |
| + 'sleep 1', |
| + 'kill -QUIT "$pid"', |
| + ], "\n") |
| + |
| service {'nginx': |
| ensure => running, |
| enable => true, |
| - restart => '/etc/init.d/nginx reload', |
| hasstatus => true, |
| - require => File['/etc/nginx/nginx.conf'] |
| + require => Package['nginx'], |
| + restart => $restart_command, |
| + subscribe => File['/etc/nginx/nginx.conf'], |
| } |
| file {'/usr/share/nginx/html/50x.html': |