From 9fa0105c77cb05a40544aa9d1baca44c158ba885 Mon Sep 17 00:00:00 2001 From: Venushka Perera Date: Sun, 17 Jun 2018 00:30:14 +0100 Subject: [PATCH] Allowing the java executable path to be specified without having to use the java version in the PATH. Signed-off-by: Venushka Perera --- manifests/init.pp | 1 + manifests/package/tarball.pp | 1 + manifests/params.pp | 1 + templates/wrapper.conf.erb | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 4978ae8..4b6bf43 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,6 +27,7 @@ $console = $activemq::params::console, $package_type = $activemq::params::package_type, $architecture_flag = $activemq::params::architecture_flag, + $java_exec = $activemq::params::java_exec, $activemqxml_source = undef, ) inherits activemq::params { diff --git a/manifests/package/tarball.pp b/manifests/package/tarball.pp index cd1df53..6b8cbf8 100644 --- a/manifests/package/tarball.pp +++ b/manifests/package/tarball.pp @@ -6,6 +6,7 @@ $system_user = $activemq::system_user, $manage_user = $activemq::manage_user, $manage_group = $activemq::manage_group, + $java_exec = $activemq::java_exec, ) { # wget from https://github.com/maestrodev/puppet-wget diff --git a/manifests/params.pp b/manifests/params.pp index 6ad50f2..be85404 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -9,6 +9,7 @@ $package_type = 'tarball', $manage_user = true, $manage_group = true, + $java_exec = 'java', ) { # path flag for the activemq init script template diff --git a/templates/wrapper.conf.erb b/templates/wrapper.conf.erb index b0aba13..ed75773 100644 --- a/templates/wrapper.conf.erb +++ b/templates/wrapper.conf.erb @@ -27,7 +27,7 @@ set.default.ACTIVEMQ_DATA=%ACTIVEMQ_BASE%/data wrapper.working.dir=. # Java Application -wrapper.java.command=java +wrapper.java.command=<%= @java_exec %> # Java Main class. This class must implement the WrapperListener interface # or guarantee that the WrapperManager class is initialized. Helper