diff --git a/manifests/backup/mysqlbackup.pp b/manifests/backup/mysqlbackup.pp index 54584e6b9..bf54d0d7b 100644 --- a/manifests/backup/mysqlbackup.pp +++ b/manifests/backup/mysqlbackup.pp @@ -5,7 +5,7 @@ $backupdir, $backupdirmode = '0700', $backupdirowner = 'root', - $backupdirgroup = 'root', + $backupdirgroup = $mysql::params::root_group, $backupcompress = true, $backuprotate = 30, $ignore_events = true, diff --git a/manifests/backup/mysqldump.pp b/manifests/backup/mysqldump.pp index c6ac4778f..907583897 100644 --- a/manifests/backup/mysqldump.pp +++ b/manifests/backup/mysqldump.pp @@ -5,7 +5,7 @@ $backupdir, $backupdirmode = '0700', $backupdirowner = 'root', - $backupdirgroup = 'root', + $backupdirgroup = $mysql::params::root_group, $backupcompress = true, $backuprotate = 30, $ignore_events = true, @@ -46,7 +46,7 @@ path => '/usr/local/sbin/mysqlbackup.sh', mode => '0700', owner => 'root', - group => 'root', + group => $mysql::params::root_group, content => template('mysql/mysqlbackup.sh.erb'), } diff --git a/manifests/backup/xtrabackup.pp b/manifests/backup/xtrabackup.pp index bdd40975f..05699ab45 100644 --- a/manifests/backup/xtrabackup.pp +++ b/manifests/backup/xtrabackup.pp @@ -6,7 +6,7 @@ $backupmethod = 'mysqldump', $backupdirmode = '0700', $backupdirowner = 'root', - $backupdirgroup = 'root', + $backupdirgroup = $mysql::params::root_group, $backupcompress = true, $backuprotate = 30, $ignore_events = true, diff --git a/templates/mysqlbackup.sh.erb b/templates/mysqlbackup.sh.erb index e3ab7cc28..21482087f 100755 --- a/templates/mysqlbackup.sh.erb +++ b/templates/mysqlbackup.sh.erb @@ -1,4 +1,8 @@ +<%- if @kernel == 'Linux' -%> #!/bin/bash +<%- else -%> +#!/bin/sh +<%- end -%> # # MySQL Backup Script # Dumps mysql databases to a file for another backup tool to pick up. @@ -27,7 +31,9 @@ PATH=<%= @execpath %> +<%- if @kernel == 'Linux' -%> set -o pipefail +<%- end -%> cleanup() {