hotfix OVPN restart
This commit is contained in:
parent
1f4a288375
commit
a352adf880
|
|
@ -20,6 +20,7 @@ import ru.kirillius.pf.sdn.web.WebService;
|
||||||
import ru.kirillius.utils.logging.SystemLogger;
|
import ru.kirillius.utils.logging.SystemLogger;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component integrating with OpenVPN to expose management RPC and synchronize route exports.
|
* Component integrating with OpenVPN to expose management RPC and synchronize route exports.
|
||||||
|
|
@ -59,7 +60,7 @@ public final class OVPN extends AbstractComponent<OVPN.OVPNConfig> {
|
||||||
@ProtectedMethod
|
@ProtectedMethod
|
||||||
public String restartSystemService() {
|
public String restartSystemService() {
|
||||||
try (var shell = new ShellExecutor(config.shellConfig)) {
|
try (var shell = new ShellExecutor(config.shellConfig)) {
|
||||||
return shell.executeCommand(new String[]{config.restartCommand});
|
return shell.executeCommand(config.restartCommand.split(Pattern.quote(" ")));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
SystemLogger.error("Error when trying to restart OVPN", CTX, e);
|
SystemLogger.error("Error when trying to restart OVPN", CTX, e);
|
||||||
return e.toString();
|
return e.toString();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue