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