10 lines
368 B
Plaintext
10 lines
368 B
Plaintext
{
|
|
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");
|
|
}
|