Skip to content

Commit 0db1be0

Browse files
author
Morgan Haskel
committed
Merge pull request puppetlabs#586 from raphink/dev/jessie
Adjust $service_status for Debian Jessie
2 parents 7870b38 + 3a27171 commit 0db1be0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

manifests/params.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@
142142
$bindir = pick($bindir, "/usr/lib/postgresql/${version}/bin")
143143
$datadir = pick($datadir, "/var/lib/postgresql/${version}/main")
144144
$confdir = pick($confdir, "/etc/postgresql/${version}/main")
145-
$service_status = pick($service_status, "/etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'")
145+
if versioncmp($::operatingsystemrelease, '8.0') >= 0 {
146+
# Jessie uses systemd
147+
$service_status = pick($service_status, "/usr/sbin/service ${service_name}@*-main status")
148+
} else {
149+
$service_status = pick($service_status, "/etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'")
150+
}
146151
$service_reload = "service ${service_name} reload"
147152
$psql_path = pick($psql_path, '/usr/bin/psql')
148153
}

0 commit comments

Comments
 (0)