generated from smedev/Template-for-SMEServer-Core-Package
* Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-1.sme
- initial version for SME11 [SME: ]
This commit is contained in:
20
root/etc/e-smith/db/configuration/migrate/80roundcube
Normal file
20
root/etc/e-smith/db/configuration/migrate/80roundcube
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
use MIME::Base64 qw(encode_base64);
|
||||
|
||||
my $rec = $DB->get('roundcube') || $DB->new_record('roundcube', {type => 'service'});
|
||||
|
||||
# migrate PublicAccess to access
|
||||
if ( my $PublicAccess = $DB->get_prop_and_delete('roundcube','PublicAccess') ) {
|
||||
$DB->set_prop('roundcube','access', "private");
|
||||
$DB->set_prop('roundcube','access', "public") if ($PublicAccess =~ /global/);
|
||||
$DB->set_prop('roundcube','status', "disabled") if ($PublicAccess == "none");
|
||||
}
|
||||
|
||||
|
||||
|
||||
my $pw = $rec->prop('DbPassword');
|
||||
return "" if $pw;
|
||||
|
||||
$rec->set_prop('DbPassword', sprintf("%15.0f", int( (1000000000000000) * rand() )));
|
||||
|
||||
}
|
Reference in New Issue
Block a user