smeserver-lemonldap-ng/root/etc/e-smith/db/configuration/migrate/lemonldap-soappasswd
2012-06-20 10:03:36 +02:00

14 lines
272 B
Plaintext

{
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");
}
}