Skip to content

Commit eb3fa4e

Browse files
committed
Merge pull request #697 from fraenki/freebsd_support
fix FreeBSD support for backups
2 parents c2ec74b + a2faed2 commit eb3fa4e

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,
@@ -46,7 +46,7 @@
4646
path => '/usr/local/sbin/mysqlbackup.sh',
4747
mode => '0700',
4848
owner => 'root',
49-
group => 'root',
49+
group => $mysql::params::root_group,
5050
content => template('mysql/mysqlbackup.sh.erb'),
5151
}
5252

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)