[icinga-checkins] icinga.org: puppet-icinga2/master: Quote PostgreSQL database password properly

git at icinga.org git at icinga.org
Fri Nov 14 07:13:21 CET 2014


Module: puppet-icinga2
Branch: master
Commit: 27988d88dc286bcf8267693e87dc17cc93f7e7b3
URL:    https://git.icinga.org/?p=puppet-icinga2.git;a=commit;h=27988d88dc286bcf8267693e87dc17cc93f7e7b3

Author: Josh Holland <josh at inv.alid.pw>
Date:   Fri Nov  7 16:21:49 2014 +0000

Quote PostgreSQL database password properly

Signed-off-by: Nick Chappell <nick at intronic.org>

Merged from: https://github.com/Icinga/puppet-icinga2/pull/40

refs#7675: https://dev.icinga.org/issues/7675

---

 manifests/server/install.pp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/manifests/server/install.pp b/manifests/server/install.pp
index 3ca7349..250aae7 100644
--- a/manifests/server/install.pp
+++ b/manifests/server/install.pp
@@ -160,7 +160,7 @@ class icinga2::server::install::execs inherits icinga2::server {
       exec { 'postgres_schema_load':
         user    => 'root',
         path    => '/usr/bin:/usr/sbin:/bin/:/sbin',
-        command => "su - postgres -c 'export PGPASSWORD='${db_password}' && psql -U ${db_user} -h localhost -d ${db_name} < ${server_db_schema_path}' && export PGPASSWORD='' && touch /etc/icinga2/postgres_schema_loaded.txt",
+        command => "su - postgres -c 'export PGPASSWORD=''${db_password}'' && psql -U ${db_user} -h localhost -d ${db_name} < ${server_db_schema_path}' && export PGPASSWORD='' && touch /etc/icinga2/postgres_schema_loaded.txt",
         creates => '/etc/icinga2/postgres_schema_loaded.txt',
         require => Class['icinga2::server::install::packages'],
       }



More information about the icinga-checkins mailing list