| 100 | WifiHotspot::~WifiHotspot() { util_delete_nm_file(); } |
| 101 | |
| 102 | void WifiHotspot::start() { |
| 103 | m_console->debug("Starting WIFI hotspot on card {}", m_wifi_card.device_name); |
| 104 | const auto args = |
| 105 | std::vector<std::string>{"con", "up", OHD_WIFI_HOTSPOT_CONNECTION_NAME}; |
| 106 | OHDUtil::run_command("nmcli", args); |
| 107 | started = true; |
| 108 | m_console->info("Wifi hotspot started"); |
| 109 | std::cout << blue << "Started WIFI hotspot on card " |
| 110 | << m_wifi_card.device_name << reset << std::endl; |
| 111 | } |
| 112 | |
| 113 | void WifiHotspot::stop() { |
| 114 | m_console->debug("Stopping wifi hotspot on card {}", m_wifi_card.device_name); |