Merge pull request #639 from cdenneen/master

Fixed systemd override for manage_repo package versions
This commit is contained in:
Morgan Haskel 2015-06-15 10:42:29 -07:00
commit c4bc7b23db
2 changed files with 5 additions and 1 deletions

View file

@ -161,7 +161,7 @@ class postgresql::server::config {
if $::operatingsystemrelease =~ /^7/ or $::operatingsystem == 'Fedora' {
file { 'systemd-override':
ensure => present,
path => '/etc/systemd/system/postgresql.service',
path => "/etc/systemd/system/${postgresql::params::service_name}.service",
owner => root,
group => root,
content => template('postgresql/systemd-override.erb'),

View file

@ -1,4 +1,8 @@
<% if @manage_package_repo and (scope.function_versioncmp([@version.to_s, '9.1']) >= 0) -%>
.include /lib/systemd/system/postgresql-<%= @version %>.service
<% else -%>
.include /lib/systemd/system/postgresql.service
<% end -%>
[Service]
Environment=PGPORT=<%= @port %>
Environment=PGDATA=<%= @datadir %>