Skip to content

Commit ab46c86

Browse files
committed
Add service_restart parameter. Fix #56
1 parent a42785c commit ab46c86

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

manifests/init.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@
171171
# [*service_status*]
172172
# If the nginx service init script supports status argument
173173
#
174+
# [*service_restart*]
175+
# If the nginx service init script supports restart argument. Default is true
176+
#
174177
# [*process*]
175178
# The name of nginx process
176179
#
@@ -274,6 +277,7 @@
274277
$package = params_lookup( 'package' ),
275278
$service = params_lookup( 'service' ),
276279
$service_status = params_lookup( 'service_status' ),
280+
$service_restart = params_lookup( 'service_restart' ),
277281
$process = params_lookup( 'process' ),
278282
$process_args = params_lookup( 'process_args' ),
279283
$process_user = params_lookup( 'process_user' ),
@@ -406,6 +410,7 @@
406410
name => $nginx::service,
407411
enable => $nginx::manage_service_enable,
408412
hasstatus => $nginx::service_status,
413+
hasrestart => $nginx::service_restart,
409414
pattern => $nginx::process,
410415
require => Package['nginx'],
411416
}

manifests/params.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
default => true,
3939
}
4040

41+
$service_restart = $::operatingsystem ? {
42+
default => true,
43+
}
44+
4145
$process = $::operatingsystem ? {
4246
default => 'nginx',
4347
}

0 commit comments

Comments
 (0)