bug fixes #23

Merged
wt merged 1 commits from bug-fixes into main 2025-03-06 22:49:49 +07:00
4 changed files with 17 additions and 10 deletions
+4 -4
View File
@@ -14,14 +14,14 @@ namespace api
{
if (!new_ftp_enabled)
{
system("rc stop ftp");
system("rc del ftp");
system("rc stop ftpd");
system("rc del ftpd");
syslog(LOG_INFO, "%s", "Ftp is disabled");
}
else
{
system("rc start ftp");
system("rc add ftp");
system("rc start ftpd");
system("rc add ftpd");
syslog(LOG_INFO, "%s", "Ftp is enabled");
}
}
+8 -1
View File
@@ -21,7 +21,14 @@ namespace api
keysfile << key << "\n";
}
keysfile.close();
system("rc restart ssh");
if (get_ssh_server() == OPENSSH_SSH)
{
system("rc restart ssh");
}
else if (get_ssh_server() == DROPBEAR_SSH)
{
system("rc restart dropbear");
}
syslog(LOG_INFO, "%s", "SSH keys changed");
}
}
+4 -4
View File
@@ -14,14 +14,14 @@ namespace api
{
if (!new_telnet_enabled)
{
system("rc stop telnet");
system("rc del telnet");
system("rc stop telnetd");
system("rc del telnetd");
syslog(LOG_INFO, "%s", "Telnet is disabled");
}
else
{
system("rc start telnet");
system("rc add telnet");
system("rc start telnetd");
system("rc add telnetd");
syslog(LOG_INFO, "%s", "Telnet is enabled");
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ namespace api
+ TELNET_PORT_FILE;
std::cout << systemrequest << std::endl;
system(systemrequest.c_str());
system("rc restart telnet");
system("rc restart telnetd");
std::string syslogstring = "Telnet port changed to " + std::to_string(new_telnet_port);
syslog(LOG_INFO, "%s", syslogstring.c_str());
}