Skip to content

Commit a2faed2

Browse files
committed
fix FreeBSD support for backups
1 parent 5de035c commit a2faed2

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

manifests/backup/mysqlbackup.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$backupdir,
66
$backupdirmode = '0700',
77
$backupdirowner = 'root',
8-
$backupdirgroup = 'root',
8+
$backupdirgroup = $mysql::params::root_group,
99
$backupcompress = true,
1010
$backuprotate = 30,
1111
$ignore_events = true,

manifests/backup/mysqldump.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$backupdir,
66
$backupdirmode = '0700',
77
$backupdirowner = 'root',
8-
$backupdirgroup = 'root',
8+
$backupdirgroup = $mysql::params::root_group,
99
$backupcompress = true,
1010
$backuprotate = 30,
1111
$ignore_events = true,
@@ -47,7 +47,7 @@
4747
path => '/usr/local/sbin/mysqlbackup.sh',
4848
mode => '0700',
4949
owner => 'root',
50-
group => 'root',
50+
group => $mysql::params::root_group,
5151
content => template('mysql/mysqlbackup.sh.erb'),
5252
}
5353

manifests/backup/xtrabackup.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
$backupmethod = 'mysqldump',
77
$backupdirmode = '0700',
88
$backupdirowner = 'root',
9-
$backupdirgroup = 'root',
9+
$backupdirgroup = $mysql::params::root_group,
1010
$backupcompress = true,
1111
$backuprotate = 30,
1212
$ignore_events = true,

templates/mysqlbackup.sh.erb

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
<%- if @kernel == 'Linux' -%>
12
#!/bin/bash
3+
<%- else -%>
4+
#!/bin/sh
5+
<%- end -%>
26
#
37
# MySQL Backup Script
48
# Dumps mysql databases to a file for another backup tool to pick up.
@@ -27,7 +31,9 @@ PATH=<%= @execpath %>
2731

2832

2933

34+
<%- if @kernel == 'Linux' -%>
3035
set -o pipefail
36+
<%- end -%>
3137

3238
cleanup()
3339
{

0 commit comments

Comments
 (0)