initial commit of file from CVS for smeserver-lemonldap-ng on Sat Sep 7 20:31:17 AEST 2024
This commit is contained in:
1
root/etc/e-smith/db/accounts/defaults/lm-reload/type
Normal file
1
root/etc/e-smith/db/accounts/defaults/lm-reload/type
Normal file
@@ -0,0 +1 @@
|
||||
url
|
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
service
|
14
root/etc/e-smith/db/configuration/migrate/90MigrateLemonLDAP
Normal file
14
root/etc/e-smith/db/configuration/migrate/90MigrateLemonLDAP
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
|
||||
use esmith::DomainsDB;
|
||||
my $d = esmith::DomainsDB->open() or die "Couldn't open DomainsDB\n";
|
||||
|
||||
foreach my $domain ($d->domains){
|
||||
my $llng = $domain->prop('LemonLDAP') || '';
|
||||
next unless $llng eq 'enabled';
|
||||
$domain->set_prop('Authentication', 'LemonLDAP');
|
||||
$domain->delete_prop('LemonLDAP');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,12 @@
|
||||
{
|
||||
|
||||
my $mp = $DB->get('modPerl') || $DB->new_record("modPerl", { type => "service", status => "enabled" });
|
||||
|
||||
if ( ($mp->prop('status') || 'disabled') eq 'enabled'){
|
||||
return "";
|
||||
}
|
||||
else{
|
||||
$DB->set_prop('modPerl', 'status', 'enabled');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
{
|
||||
|
||||
my $rec = $DB->get('lemonldap')
|
||||
|| $DB->new_record('lemonldap', {type => 'service'});
|
||||
|
||||
my $pw = $rec->prop('SoapPassword');
|
||||
|
||||
if (not $pw){
|
||||
my $rand = `/usr/bin/openssl rand -base64 35 | tr -cd '[:alnum:]'`;
|
||||
$rec->set_prop('SoapPassword', "$rand");
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user