From cc5cad39a7877fd1d8f77cb29709ed1159233005 Mon Sep 17 00:00:00 2001 From: Chris Price Date: Thu, 14 Jun 2012 15:12:51 -0700 Subject: [PATCH] Fix for debian 6 service name It turns out that Ubuntu and Debian have different names for the postgres service; this fix makes the module compatible with debian 6. --- manifests/params.pp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 24d4bed..a7d5e83 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -45,7 +45,16 @@ class postgresql::params { } 'Debian': { - $service_name = "postgresql-${::postgres_default_version}" + case $::operatingsystem { + 'Debian': { + $service_name = "postgresql" + } + + 'Ubuntu': { + $service_name = "postgresql-${::postgres_default_version}" + } + } + $client_package_name = 'postgresql-client' $server_package_name = 'postgresql' $needs_initdb = false