Files
openrouter/src/settings/wifi/status.cpp
T
wt 6fe6a1aaf8
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled
updated added classes and updated web
2025-04-24 13:56:58 +07:00

30 lines
750 B
C++

#include <settings/wifi/wifi.hpp>
#include <syslog.h>
#define WIFI_REQUIRED_STRING R"({"required":"[token,status]"})"
namespace api
{
namespace settings
{
namespace wifi
{
void Wifi::set_wifi_status(bool new_wifi_status)
{
if (!new_wifi_status)
{
system("rc stop hostapd");
system("rc del hostapd");
syslog(LOG_INFO, "%s", "WIFI is disabled");
}
else
{
system("rc start hostapd");
system("rc add hostapd");
syslog(LOG_INFO, "%s", "WIFI is enabled");
}
}
}
}
}