mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
openvpn: Remove stat files when connections are removed
This commit is contained in:
@@ -1237,6 +1237,9 @@ SETTINGS_ERROR:
|
|||||||
while ($file = glob("${General::swroot}/ovpn/n2nconf/*")) {
|
while ($file = glob("${General::swroot}/ovpn/n2nconf/*")) {
|
||||||
system ("rm -rf $file");
|
system ("rm -rf $file");
|
||||||
}
|
}
|
||||||
|
while ($file = glob("/var/run/openvpn/*-n2n")) {
|
||||||
|
unlink $file;
|
||||||
|
}
|
||||||
|
|
||||||
# Remove everything from the collectd configuration
|
# Remove everything from the collectd configuration
|
||||||
&writecollectdconf();
|
&writecollectdconf();
|
||||||
@@ -2364,6 +2367,8 @@ if ($confighash{$cgiparams{'KEY'}}[3] eq 'net') {
|
|||||||
if (-e "${General::swroot}/ovpn/n2nconf/$confighash{$cgiparams{'KEY'}}[1]") {
|
if (-e "${General::swroot}/ovpn/n2nconf/$confighash{$cgiparams{'KEY'}}[1]") {
|
||||||
rmdir ("${General::swroot}/ovpn/n2nconf/$confighash{$cgiparams{'KEY'}}[1]") || die "Kann Verzeichnis nicht loeschen: $!";
|
rmdir ("${General::swroot}/ovpn/n2nconf/$confighash{$cgiparams{'KEY'}}[1]") || die "Kann Verzeichnis nicht loeschen: $!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unlink("/var/run/openvpn/$confighash{$cgiparams{'KEY'}}[1]-n2n");
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink ("${General::swroot}/ovpn/certs/$confighash{$cgiparams{'KEY'}}[1]cert.pem");
|
unlink ("${General::swroot}/ovpn/certs/$confighash{$cgiparams{'KEY'}}[1]cert.pem");
|
||||||
|
|||||||
Reference in New Issue
Block a user