You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
368 B
10 lines
368 B
12 years ago
|
{
|
||
|
my $openvpn = $DB->get('openvpn-routed') || $DB->new_record('openvpn-routed', {type => 'service'});
|
||
|
my $management = $openvpn->prop('ManagementPassword') || '';
|
||
|
return "" if ($management ne '');
|
||
|
|
||
|
# Generate a random password
|
||
|
$pass=`/usr/bin/openssl rand -base64 20 | tr -c -d '[:alnum:]'`;
|
||
|
$openvpn->set_prop('ManagementPassword',"$pass");
|
||
|
}
|