initial commit of file from CVS for smeserver-automysqlbackup on Sat Sep 7 20:08:47 AEST 2024
This commit is contained in:
17
root/etc/e-smith/db/configuration/migrate/85automysqlbackup
Normal file
17
root/etc/e-smith/db/configuration/migrate/85automysqlbackup
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
|
||||
my $rec = $DB->get('automysqlbackup') || $DB->new_record('automysqlbackup', { type => 'webapp' });
|
||||
my $pw = $rec->prop('DbPassword');
|
||||
|
||||
if (not $pw){
|
||||
$pw = `/usr/bin/openssl rand -base64 60 | tr -c -d '[:graph:]'`;
|
||||
chomp($pw);
|
||||
$rec->set_prop('DbPassword', $pw);
|
||||
}
|
||||
|
||||
# if mysql53 exists; ie before tidying the contrib : there is no mysql53 on SME, 5.1 or 5.5
|
||||
#delete Mymaria Mysql53 Mysql55 Mysql57; so we use the default as hardcoded in scripts
|
||||
if ( defined $rec->prop('Mysql53') ){
|
||||
$rec->delete_prop($_) for ( qw(Mymaria Mysql53 Mysql55 Mysql57) );
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user