Skip to content

Commit c17a7a3

Browse files
committed
properly implement $service_restart, refs #17
1 parent ce9be32 commit c17a7a3

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

manifests/init.pp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,9 @@
213213
Optional[Integer] $gid = undef,
214214
Optional[Integer] $uid = undef,
215215
) {
216-
if ($service_restart) {
217-
Class['activemq::install'] ~> Class['activemq::service']
218-
}
219-
220216
# Perform basic installation steps
221217
class { 'activemq::install': }
218+
~> class { 'activemq::service': }
222219

223220
# Ensure that a valid cluster configuration is provided.
224221
if ($cluster and (empty($cluster_name) or !($cluster_name =~ String))) {

manifests/instance.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,11 +707,13 @@
707707
}
708708

709709
# Configure service for this instance.
710+
$_restart = $activemq::service_restart ? { true => undef, default => ':' }
710711
service { $instance_service:
711712
ensure => $_service_ensure,
712713
enable => $_service_enable,
713714
subscribe => $_service_subscribe,
714715
require => $_service_require,
716+
restart => $_restart,
715717
}
716718
}
717719
}

0 commit comments

Comments
 (0)