Merge pull request #677 from cavaliercoder/master
(MODULES-2211) Fixed systemd-override for RedHat systems with unmanaged Yum repos
This commit is contained in:
commit
e42d787141
2 changed files with 3 additions and 6 deletions
|
@ -20,6 +20,7 @@ class postgresql::server::config {
|
||||||
$manage_recovery_conf = $postgresql::server::manage_recovery_conf
|
$manage_recovery_conf = $postgresql::server::manage_recovery_conf
|
||||||
$datadir = $postgresql::server::datadir
|
$datadir = $postgresql::server::datadir
|
||||||
$logdir = $postgresql::server::logdir
|
$logdir = $postgresql::server::logdir
|
||||||
|
$service_name = $postgresql::server::service_name
|
||||||
|
|
||||||
if ($manage_pg_hba_conf == true) {
|
if ($manage_pg_hba_conf == true) {
|
||||||
# Prepare the main pg_hba file
|
# Prepare the main pg_hba file
|
||||||
|
@ -163,7 +164,7 @@ class postgresql::server::config {
|
||||||
if $::operatingsystemrelease =~ /^7/ or $::operatingsystem == 'Fedora' {
|
if $::operatingsystemrelease =~ /^7/ or $::operatingsystem == 'Fedora' {
|
||||||
file { 'systemd-override':
|
file { 'systemd-override':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
path => "/etc/systemd/system/${postgresql::params::service_name}.service",
|
path => "/etc/systemd/system/${service_name}.service",
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => root,
|
||||||
content => template('postgresql/systemd-override.erb'),
|
content => template('postgresql/systemd-override.erb'),
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
<% if @manage_package_repo and (scope.function_versioncmp([@version.to_s, '9.1']) >= 0) -%>
|
.include /lib/systemd/system/<%= @service_name %>.service
|
||||||
.include /lib/systemd/system/postgresql-<%= @version %>.service
|
|
||||||
<% else -%>
|
|
||||||
.include /lib/systemd/system/postgresql.service
|
|
||||||
<% end -%>
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=PGPORT=<%= @port %>
|
Environment=PGPORT=<%= @port %>
|
||||||
Environment=PGDATA=<%= @datadir %>
|
Environment=PGDATA=<%= @datadir %>
|
||||||
|
|
Loading…
Reference in a new issue