Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineco committed Jan 19, 2015
1 parent e8892ec commit 81f758c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion manifests/install/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
file_line { 'fix broken tomcat init script':
path => "/etc/init.d/${::tomcat::service_name_real}",
line => "NAME=\"$(basename \$0)\"",
match => "^NAME=.*$",
match => "^NAME=.*\$",
require => Package['tomcat server']
}
}
Expand Down
46 changes: 23 additions & 23 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -281,21 +281,21 @@
'package' : {
# manage systemd unit on compatible systems
if $::tomcat::params::systemd {
if $::osfamily == 'Suse' { # SuSE
file { "${service_name_real} service unit":
path => "/usr/lib/systemd/system/${service_name_real}.service",
owner => 'root',
group => 'root',
content => template("${module_name}/instance/systemd_unit_suse.erb")
}
} else { # RHEL 7+ or Fedora
file { "${service_name_real} service unit":
path => "/usr/lib/systemd/system/${service_name_real}.service",
owner => 'root',
group => 'root',
content => template("${module_name}/instance/systemd_unit_rhel.erb")
}
}
if $::osfamily == 'Suse' { # SuSE
file { "${service_name_real} service unit":
path => "/usr/lib/systemd/system/${service_name_real}.service",
owner => 'root',
group => 'root',
content => template("${module_name}/instance/systemd_unit_suse.erb")
}
} else { # RHEL 7+ or Fedora
file { "${service_name_real} service unit":
path => "/usr/lib/systemd/system/${service_name_real}.service",
owner => 'root',
group => 'root',
content => template("${module_name}/instance/systemd_unit_rhel.erb")
}
}
} else { # symlink main init script on all other distributions (Debian/Ubuntu, RHEL 6, SLES 11, ...)
file { "${service_name_real} service unit":
ensure => link,
Expand Down Expand Up @@ -337,20 +337,20 @@
enable => $service_enable,
require => File["${service_name_real} service unit"];
}
}
}
# Debian/Ubuntu, RHEL 6, SLES 11, ...
else {
$start_command = "export CATALINA_BASE=${catalina_base_real}; /bin/su ${::tomcat::tomcat_user_real} -s /bin/bash -c '${service_start_real}'"
$stop_command = "export CATALINA_BASE=${catalina_base_real}; /bin/su ${::tomcat::tomcat_user_real} -s /bin/bash -c '${service_stop_real}'"
$status_command = "/usr/bin/pgrep -d , -u ${::tomcat::tomcat_user_real} -G ${::tomcat::tomcat_group_real} -f Dcatalina.base=${catalina_base_real}"

file { "${service_name_real} service unit":
path => "/etc/init.d/${service_name_real}",
owner => 'root',
group => 'root',
mode => '0755',
content => template("${module_name}/instance/tomcat_init_generic.erb")
}
file { "${service_name_real} service unit":
path => "/etc/init.d/${service_name_real}",
owner => 'root',
group => 'root',
mode => '0755',
content => template("${module_name}/instance/tomcat_init_generic.erb")
}

service { $service_name_real:
ensure => $service_ensure,
Expand Down

0 comments on commit 81f758c

Please sign in to comment.