Skip to content

Commit

Permalink
vpn-statistic: add collectd parameters to imported n2n packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Marx authored and mtremer committed Apr 14, 2015
1 parent daf3429 commit 7dfcaef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion html/cgi-bin/ovpnmain.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -3197,7 +3197,6 @@ END
@firen2nconf = <FILE>;
close (FILE);
chomp(@firen2nconf);

} else {

$errormessage = "Filecount does not match only 2 files are allowed\n";
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 7dfcaef

Please sign in to comment.