Files
openrouter/src/settings/dns/enabled.cpp
T
wt cedc9cd995
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Waiting to run
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Waiting to run
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Waiting to run
making easy
2025-02-20 18:07:59 +07:00

28 lines
668 B
C++

#include <settings/dns/dns.hpp>
#include <syslog.h>
namespace api
{
namespace settings
{
namespace dns
{
void set_dns(bool new_dns_enabled)
{
if (!new_dns_enabled)
{
system("rc stop dnsmasq");
system("rc del dnsmasq");
syslog(LOG_INFO, "%s", "DNS is disabled");
}
else
{
system("rc restart dnsmasq");
system("rc add dnsmasq");
syslog(LOG_INFO, "%s", "DNS is enabled");
}
}
}
}
}