mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 01:42:58 +02:00
OpenVPN CCD: Fix ccd filename when certificate has spaces in name. Now the filename gets an underscore to provide full functionality of openvpn.
This commit is contained in:
committed by
Michael Tremer
parent
1d109fd2a6
commit
b643120c01
@@ -31,6 +31,7 @@ open(FILE,"/var/ipfire/ovpn/server.conf");
|
||||
&General::readhasharray("/var/ipfire/ovpn/ovpnconfig", \%ovpnconfig);
|
||||
foreach my $key (keys %ovpnconfig){
|
||||
if($ovpnconfig{$key}[32] eq '' && $ovpnconfig{$key}[3] eq 'host'){
|
||||
$ovpnconfig{$key}[2] =~ s/ /_/gi;
|
||||
open ( CCDRWCONF,'>',"/var/ipfire/ovpn/ccd/$ovpnconfig{$key}[2]") or die "Unable to create clientconfigfile $!";
|
||||
print CCDRWCONF "# OpenVPN Clientconfig from CCD extension by Copymaster#\n\n";
|
||||
print CCDRWCONF "#This client uses the dynamic pool\n\n";
|
||||
|
||||
Reference in New Issue
Block a user