mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Don't ask if user wants to create znc.pem or not
Sure they want!
This commit is contained in:
+9
-13
@@ -600,19 +600,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
|
||||
|
||||
|
||||
#ifdef HAVE_LIBSSL
|
||||
if (CUtils::GetBoolInput("Would you like ZNC to listen using SSL?", bListenSSL)) {
|
||||
bListenSSL = true;
|
||||
|
||||
CString sPemFile = GetPemLocation();
|
||||
if (!CFile::Exists(sPemFile)) {
|
||||
CUtils::PrintError("Unable to locate pem file: [" + sPemFile + "]");
|
||||
if (CUtils::GetBoolInput("Would you like to create a new pem file now?",
|
||||
true)) {
|
||||
WritePemFile();
|
||||
}
|
||||
}
|
||||
} else
|
||||
bListenSSL = false;
|
||||
bListenSSL = CUtils::GetBoolInput("Would you like ZNC to listen using SSL?", bListenSSL);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IPV6
|
||||
@@ -632,6 +620,14 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
|
||||
delete pListener;
|
||||
} while (!bSuccess);
|
||||
|
||||
#ifdef HAVE_LIBSSL
|
||||
CString sPemFile = GetPemLocation();
|
||||
if (!CFile::Exists(sPemFile)) {
|
||||
CUtils::PrintMessage("Unable to locate pem file: [" + sPemFile + "], creating it");
|
||||
WritePemFile();
|
||||
}
|
||||
#endif
|
||||
|
||||
vsLines.push_back("<Listener l>");
|
||||
vsLines.push_back("\tPort = " + CString(uListenPort));
|
||||
vsLines.push_back("\tIPv4 = true");
|
||||
|
||||
Reference in New Issue
Block a user