OpenVPN ccd: fix creation of ccd directory via ovpn-ccd-convert script

Fixes #10263.
This commit is contained in:
Alexander Marx
2012-12-07 17:00:46 +01:00
committed by Michael Tremer
parent 36e1dc20f4
commit 1d0fcb09ed

View File

@@ -1,13 +1,15 @@
#!/usr/bin/perl
# Converter script for old openvpn clients
my %net=();
my %ovpnconfig=();
my @serverconf=();
my $greennet;
my $greensubnet;
my $running='off';
require '/var/ipfire/general-functions.pl';
require '/var/ipfire/general-functions.pl';
unless (-d "${General::swroot}/ovpn/ccd") { system("mkdir ${General::swroot}/ovpn/ccd"); }
system ("chown nobody.nobody ${General::swroot}/ovpn/ccd");
if ( -e "/var/run/openvpn.pid"){
$running='on';
system('/usr/local/bin/openvpnctrl', '-k');