mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-20 16:02:59 +02:00
openvpn: Remove RRDs when removing all connections at once
This commit is contained in:
@@ -1190,9 +1190,13 @@ SETTINGS_ERROR:
|
||||
&General::readhasharray("${General::swroot}/ovpn/ovpnconfig", \%confighash);
|
||||
|
||||
foreach my $key (keys %confighash) {
|
||||
my $name = $confighash{$cgiparams{'$key'}}[1];
|
||||
|
||||
if ($confighash{$key}[4] eq 'cert') {
|
||||
delete $confighash{$cgiparams{'$key'}};
|
||||
}
|
||||
|
||||
system ("/usr/local/bin/openvpnctrl -drrd $name");
|
||||
}
|
||||
while ($file = glob("${General::swroot}/ovpn/ca/*")) {
|
||||
unlink $file;
|
||||
@@ -1219,11 +1223,6 @@ SETTINGS_ERROR:
|
||||
while ($file = glob("${General::swroot}/ovpn/ccd/*")) {
|
||||
unlink $file
|
||||
}
|
||||
# Delete all RRD files for Roadwarrior connections
|
||||
chdir('/var/ipfire/ovpn/ccd');
|
||||
while ($file = glob("*")) {
|
||||
system ("/usr/local/bin/openvpnctrl -drrd $file");
|
||||
}
|
||||
while ($file = glob("${General::swroot}/ovpn/ccd/*")) {
|
||||
unlink $file
|
||||
}
|
||||
@@ -1239,6 +1238,9 @@ SETTINGS_ERROR:
|
||||
system ("rm -rf $file");
|
||||
}
|
||||
|
||||
# Remove everything from the collectd configuration
|
||||
&writecollectdconf();
|
||||
|
||||
#&writeserverconf();
|
||||
###
|
||||
### Reset all step 1
|
||||
|
||||
Reference in New Issue
Block a user