diff --git a/src/settings/ftp/ftp.cpp b/src/settings/ftp/ftp.cpp index 48b7062..4edfb1f 100644 --- a/src/settings/ftp/ftp.cpp +++ b/src/settings/ftp/ftp.cpp @@ -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"); } } diff --git a/src/settings/ssh/keys.cpp b/src/settings/ssh/keys.cpp index 5afe324..9c31d8e 100644 --- a/src/settings/ssh/keys.cpp +++ b/src/settings/ssh/keys.cpp @@ -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"); } } diff --git a/src/settings/telnet/enabled.cpp b/src/settings/telnet/enabled.cpp index 592237f..5d67ae4 100644 --- a/src/settings/telnet/enabled.cpp +++ b/src/settings/telnet/enabled.cpp @@ -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"); } } diff --git a/src/settings/telnet/port.cpp b/src/settings/telnet/port.cpp index d256db5..5b32277 100644 --- a/src/settings/telnet/port.cpp +++ b/src/settings/telnet/port.cpp @@ -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()); }