Skip to content

Commit

Permalink
interpolate $prog in init.d script
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Oct 2, 2013
1 parent 80373a6 commit d742263
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
class selenium::config {

$options = '-Dwebdriver.enable.native.events=1'
$prog = 'selenium'

file { '/etc/init.d/selenium':
ensure => 'file',
Expand Down
3 changes: 2 additions & 1 deletion spec/classes/selenium_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
with_content(/SLNM_USER='selenium'/).
with_content(/SLNM_INSTALL_PATH='\/opt\/selenium'/).
with_content(/SLNM_JAR_NAME='selenium-server-standalone-2.35.0.jar'/).
with_content(/SLNM_OPTIONS='-Dwebdriver.enable.native.events=1'/)
with_content(/SLNM_OPTIONS='-Dwebdriver.enable.native.events=1'/).
with_content(/prog='selenium'/)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion templates/init.d/selenium.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SLNM_LOG="${SLNM_INSTALL_PATH}/log/server.log"
SLNM_ERROR_LOG="${SLNM_INSTALL_PATH}/log/error.log"
SLNM_JAR="${SLNM_INSTALL_PATH}/jars/${SLNM_JAR_NAME}"

prog="selenium"
prog='<%= scope.lookupvar('selenium::config::prog') %>'
#config="<path to major config file>"

#[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
Expand Down

0 comments on commit d742263

Please sign in to comment.