initial commit of file from CVS for smeserver-openvpn-bridge on Sat Sep 7 19:57:25 AEST 2024
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
my $openvpn = $DB->get('openvpn-bridge') || $DB->new_record('openvpn-bridge', {type => 'service'});
|
||||
my $management = $openvpn->prop('management') || '';
|
||||
# If the management interface is already defined, return nothing
|
||||
return "" if ($management ne '');
|
||||
|
||||
# Else, we generate a random password
|
||||
|
||||
$pass=`/usr/bin/openssl rand -base64 20 | tr -c -d '[:alnum:]'`;
|
||||
$openvpn->set_prop('management',"localhost:11194:$pass");
|
||||
}
|
||||
|
Reference in New Issue
Block a user