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

Unified 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.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld