Files
openrouter/src/settings/ftp/ftp.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

31 lines
744 B
C++

#include <settings/ftp/ftp.hpp>
#include <syslog.h>
#include <stdlib.h>
#define FTP_REQUIRED_STRING R"({"required":"[token,enabled]"})"
namespace api
{
namespace settings
{
namespace ftp
{
void Ftp::set_ftp(bool new_ftp_enabled)
{
if (!new_ftp_enabled)
{
system("rc stop ftpd");
system("rc del ftpd");
syslog(LOG_INFO, "%s", "Ftp is disabled");
}
else
{
system("rc start ftpd");
system("rc add ftpd");
syslog(LOG_INFO, "%s", "Ftp is enabled");
}
}
}
}
}