Adjust $service_status for Debian Jessie

This commit is contained in:
Raphaël Pinson 2015-03-17 15:55:53 +01:00
parent 7870b38db6
commit 3a2717111d

View file

@ -142,7 +142,12 @@ class postgresql::params inherits postgresql::globals {
$bindir = pick($bindir, "/usr/lib/postgresql/${version}/bin")
$datadir = pick($datadir, "/var/lib/postgresql/${version}/main")
$confdir = pick($confdir, "/etc/postgresql/${version}/main")
$service_status = pick($service_status, "/etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'")
if versioncmp($::operatingsystemrelease, '8.0') >= 0 {
# Jessie uses systemd
$service_status = pick($service_status, "/usr/sbin/service ${service_name}@*-main status")
} else {
$service_status = pick($service_status, "/etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'")
}
$service_reload = "service ${service_name} reload"
$psql_path = pick($psql_path, '/usr/bin/psql')
}