| 473 | } |
| 474 | |
| 475 | std::string setDnsScriptEnabled(const std::string &pars) |
| 476 | { |
| 477 | bool enabled; |
| 478 | deserializePars(pars, enabled); |
| 479 | |
| 480 | spdlog::info("Set DNS script: {}", enabled ? "enabled" : "disabled"); |
| 481 | std::string out; |
| 482 | // We only handle the down case; the 'up' trigger happens elsewhere |
| 483 | if (!enabled) { |
| 484 | Utils::executeCommand(MacUtils::resourcePath() + "/dns.sh", {"-down"}, &out); |
| 485 | spdlog::info("{}", out.c_str()); |
| 486 | } |
| 487 | return std::string(); |
| 488 | } |
| 489 | |
| 490 | std::string enableMacSpoofingOnBoot(const std::string &pars) |
| 491 | { |
nothing calls this directly
no test coverage detected