Files
openrouter/src/settings/ftp/ftp.cpp
T
wt 0f05518140
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
deleted sstream
2025-02-28 16:14:34 +07:00

31 lines
735 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 set_ftp(bool new_ftp_enabled)
{
if (!new_ftp_enabled)
{
system("rc stop ftp");
system("rc del ftp");
syslog(LOG_INFO, "%s", "Ftp is disabled");
}
else
{
system("rc start ftp");
system("rc add ftp");
syslog(LOG_INFO, "%s", "Ftp is enabled");
}
}
}
}
}