Improve port changing support.
This makes Debian 6 work, and hopefully Ubuntu 10.04 too.
This commit is contained in:
parent
e8a24d1513
commit
29a597ab05
2 changed files with 18 additions and 4 deletions
|
@ -30,9 +30,23 @@ define postgresql::server::config_entry (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# We have to handle ports in a weird and special way. On Redhat we either
|
# We have to handle ports in a weird and special way. On early Debian and
|
||||||
# have to create a systemd override for the port or update the sysconfig
|
# Ubuntu we have to ensure we stop the service completely. On Redhat we
|
||||||
# file.
|
# either have to create a systemd override for the port or update the
|
||||||
|
# sysconfig file.
|
||||||
|
if $::operatingsystem == 'Debian' or $::operatingsystem == 'Ubuntu' {
|
||||||
|
if $::operatingsystemrelease =~ /^6/ or $::operatingsystemrelease =~ /^10\.04/ {
|
||||||
|
if $name == 'port' {
|
||||||
|
exec { 'postgresql_stop':
|
||||||
|
command => "service ${::postgresql::server::service_name} stop",
|
||||||
|
onlyif => "service ${::postgresql::server::service_name} status",
|
||||||
|
unless => "grep 'port = ${value}' ${::postgresql::server::postgresql_conf_path}",
|
||||||
|
path => '/usr/sbin:/sbin:/bin:/usr/bin:/usr/local/bin',
|
||||||
|
before => Postgresql_conf[$name],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if $::osfamily == 'RedHat' {
|
if $::osfamily == 'RedHat' {
|
||||||
if $::operatingsystemrelease =~ /^7/ or $::operatingsystem == 'Fedora' {
|
if $::operatingsystemrelease =~ /^7/ or $::operatingsystem == 'Fedora' {
|
||||||
if $name == 'port' {
|
if $name == 'port' {
|
||||||
|
|
Loading…
Reference in a new issue