Skip to content

Commit

Permalink
Merge pull request #46 from anho/bugfix/node-and-hub-on-same-server
Browse files Browse the repository at this point in the history
make file for init-script unique
  • Loading branch information
Joshua Hoblitt committed Jul 27, 2015
2 parents e2ed805 + 56db553 commit afe1d8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@
validate_string($java)
validate_string($jar_name)

$init_script = "init-script-${name}"

case $::osfamily {
'debian': {
ensure_packages(['daemon'])
Package['daemon'] -> File['init-script']
Package['daemon'] -> File[$init_script]
}
default : {}
}

# prog is the 'name' of the init.d script.
$prog = "selenium${name}"

file { 'init-script':
file { $init_script:
ensure => 'file',
path => "/etc/init.d/${prog}",
owner => 'root',
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/defines/selenium_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
p.merge!(params) if params

it do
should contain_file('init-script').with({
should contain_file("init-script-#{title}").with({
'ensure' => 'file',
'path' => "/etc/init.d/selenium#{title}",
'owner' => 'root',
Expand Down

0 comments on commit afe1d8c

Please sign in to comment.