Skip to content

Commit

Permalink
Bugfix: only create db scheme once when tables are not yet deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
visibilityspots committed Jan 4, 2016
1 parent df99507 commit 0cc89ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/initialize.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
case $::icingaweb2::web_db {
'mysql': {
exec { 'create db scheme':
command => "mysql -u ${::icingaweb2::web_db_user} -p${::icingaweb2::web_db_pass} ${::icingaweb2::web_db_name} < /usr/share/doc/icingaweb2/schema/mysql.schema.sql",
onlyif => 'test -f /root/.my.cnf',
command => "mysql --defaults-file='/root/.my.cnf' ${::icingaweb2::web_db_name} < /usr/share/doc/icingaweb2/schema/mysql.schema.sql",
unless => "mysql --defaults-file='/root/.my.cnf' ${::icingaweb2::web_db_name} -e \"SELECT 1 FROM icingaweb_user LIMIT 1;\"",
notify => Exec['create web user']
}

Expand Down

0 comments on commit 0cc89ec

Please sign in to comment.