Escape backslash

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

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

refs#7675: https://dev.icinga.org/issues/7675
This commit is contained in:
Josh Holland 2014-11-07 16:32:19 +00:00 committed by Nick Chappell
parent f74aab291b
commit 5f1e23e00d

View file

@ -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'],
}