bugfix: Correctly use QProcess::start and QProcess::execute (#1331)
Affected functions (all on Linux/Mac): - `RouterLinux::flushDns` was not reloading the DNS manager. - `Utils::processIsRunning` was always saying that the process is not running when `fullFlag` was set to `false`. - `Utils::killProcessByName` was not killing anything.
This commit is contained in:
parent
6acaab0ffa
commit
a741186c21
2 changed files with 9 additions and 4 deletions
|
@ -162,11 +162,11 @@ void RouterLinux::flushDns()
|
|||
|| QFileInfo::exists("/usr/sbin/nscd")
|
||||
|| QFileInfo::exists("/usr/lib/systemd/system/nscd.service"))
|
||||
{
|
||||
p.start("systemctl restart nscd");
|
||||
p.start("systemctl", { "restart", "nscd" });
|
||||
}
|
||||
else
|
||||
{
|
||||
p.start("systemctl restart systemd-resolved");
|
||||
p.start("systemctl", { "restart", "systemd-resolved" });
|
||||
}
|
||||
|
||||
p.waitForFinished();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue