mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 08:22:59 +02:00
Merge remote-tracking branch 'origin/master' into next
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
###############################################################################
|
||||
|
||||
use strict;
|
||||
|
||||
use URI::Escape;
|
||||
# enable only the following on debugging purpose
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
@@ -37,7 +37,7 @@ my %mainsettings = ();
|
||||
|
||||
my @vpns=();
|
||||
|
||||
my @querry = split(/\?/,$ENV{'QUERY_STRING'});
|
||||
my @querry = split(/\?/,uri_unescape($ENV{'QUERY_STRING'}));
|
||||
$querry[0] = '' unless defined $querry[0];
|
||||
$querry[1] = 'week' unless defined $querry[1];
|
||||
|
||||
|
||||
@@ -3197,7 +3197,6 @@ END
|
||||
@firen2nconf = <FILE>;
|
||||
close (FILE);
|
||||
chomp(@firen2nconf);
|
||||
|
||||
} else {
|
||||
|
||||
$errormessage = "Filecount does not match only 2 files are allowed\n";
|
||||
@@ -3238,6 +3237,13 @@ END
|
||||
unless(-d "${General::swroot}/ovpn/n2nconf/"){mkdir "${General::swroot}/ovpn/n2nconf", 0755 or die "Unable to create dir $!";}
|
||||
unless(-d "${General::swroot}/ovpn/n2nconf/$n2nname[0]"){mkdir "${General::swroot}/ovpn/n2nconf/$n2nname[0]", 0770 or die "Unable to create dir $!";}
|
||||
|
||||
#Add collectd settings to configfile
|
||||
open(FILE, ">> $tempdir/$uplconffilename") or die 'Unable to open config file.';
|
||||
print FILE "# Logfile\n";
|
||||
print FILE "status-version 1\n";
|
||||
print FILE "status /var/run/openvpn/$n2nname[0]-n2n 10\n";
|
||||
close FILE;
|
||||
|
||||
move("$tempdir/$uplconffilename", "${General::swroot}/ovpn/n2nconf/$n2nname[0]/$uplconffilename2");
|
||||
|
||||
if ($? ne 0) {
|
||||
|
||||
Reference in New Issue
Block a user