&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;
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
}
system ("rm -rf $file");
}
+ # Remove everything from the collectd configuration
+ &writecollectdconf();
+
#&writeserverconf();
###
### Reset all step 1