smeserver-lemonldap-ng/root/etc/e-smith/db/configuration/migrate/lemonldap-soappasswd

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