Change PKI path from /etc/icinga2/pki to /var/lib/icinga2/pki

refs #5450
This commit is contained in:
Gunnar Beutner 2017-08-23 12:18:45 +02:00
parent abdd4b307b
commit b08f5477dc
4 changed files with 17 additions and 17 deletions

View File

@ -3,9 +3,9 @@
*/ */
object ApiListener "api" { object ApiListener "api" {
cert_path = SysconfDir + "/icinga2/pki/" + NodeName + ".crt" cert_path = LocalStateDir + "/lib/icinga2/pki/" + NodeName + ".crt"
key_path = SysconfDir + "/icinga2/pki/" + NodeName + ".key" key_path = LocalStateDir + "/lib/icinga2/pki/" + NodeName + ".key"
ca_path = SysconfDir + "/icinga2/pki/ca.crt" ca_path = LocalStateDir + "/lib/icinga2/pki/ca.crt"
ticket_salt = TicketSalt ticket_salt = TicketSalt
} }

View File

@ -175,9 +175,9 @@ int NodeSetupCommand::SetupMaster(const boost::program_options::variables_map& v
<< " * The API listener is used for distributed monitoring setups.\n" << " * The API listener is used for distributed monitoring setups.\n"
<< " */\n" << " */\n"
<< "object ApiListener \"api\" {\n" << "object ApiListener \"api\" {\n"
<< " cert_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".crt\"\n" << " cert_path = LocalStateDir + \"/lib/icinga2/pki/\" + NodeName + \".crt\"\n"
<< " key_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".key\"\n" << " key_path = LocalStateDir + \"/lib/icinga2/pki/\" + NodeName + \".key\"\n"
<< " ca_path = SysconfDir + \"/icinga2/pki/ca.crt\"\n"; << " ca_path = LocalStateDir + \"/lib/icinga2/pki/ca.crt\"\n";
if (vm.count("listen")) { if (vm.count("listen")) {
std::vector<String> tokens; std::vector<String> tokens;
@ -379,9 +379,9 @@ int NodeSetupCommand::SetupNode(const boost::program_options::variables_map& vm,
<< " * The API listener is used for distributed monitoring setups.\n" << " * The API listener is used for distributed monitoring setups.\n"
<< " */\n" << " */\n"
<< "object ApiListener \"api\" {\n" << "object ApiListener \"api\" {\n"
<< " cert_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".crt\"\n" << " cert_path = LocalStateDir + \"/lib/icinga2/pki/\" + NodeName + \".crt\"\n"
<< " key_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".key\"\n" << " key_path = LocalStateDir + \"/lib/icinga2/pki/\" + NodeName + \".key\"\n"
<< " ca_path = SysconfDir + \"/icinga2/pki/ca.crt\"\n"; << " ca_path = LocalStateDir + \"/lib/icinga2/pki/ca.crt\"\n";
if (vm.count("listen")) { if (vm.count("listen")) {
std::vector<String> tokens; std::vector<String> tokens;

View File

@ -91,7 +91,7 @@ int NodeWizardCommand::Run(const boost::program_options::variables_map& vm,
* 5. Local CA * 5. Local CA
* 6. New self signed certificate * 6. New self signed certificate
* 7. Request signed certificate from master * 7. Request signed certificate from master
* 8. copy key information to /etc/icinga2/pki * 8. copy key information to /var/lib/icinga2/pki
* 9. enable ApiListener feature * 9. enable ApiListener feature
* 10. generate zones.conf with endpoints and zone objects * 10. generate zones.conf with endpoints and zone objects
* 11. set NodeName = cn in constants.conf * 11. set NodeName = cn in constants.conf
@ -409,9 +409,9 @@ wizard_ticket:
<< " * The API listener is used for distributed monitoring setups.\n" << " * The API listener is used for distributed monitoring setups.\n"
<< " */\n" << " */\n"
<< "object ApiListener \"api\" {\n" << "object ApiListener \"api\" {\n"
<< " cert_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".crt\"\n" << " cert_path = LocalStateDir + \"/lib/icinga2/pki/\" + NodeName + \".crt\"\n"
<< " key_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".key\"\n" << " key_path = LocalStateDir + \"/lib/icinga2/pki/\" + NodeName + \".key\"\n"
<< " ca_path = SysconfDir + \"/icinga2/pki/ca.crt\"\n" << " ca_path = LocalStateDir + \"/lib/icinga2/pki/ca.crt\"\n"
<< "\n" << "\n"
<< " accept_config = " << accept_config << "\n" << " accept_config = " << accept_config << "\n"
<< " accept_commands = " << accept_commands << "\n"; << " accept_commands = " << accept_commands << "\n";
@ -531,9 +531,9 @@ wizard_ticket:
<< " * The API listener is used for distributed monitoring setups.\n" << " * The API listener is used for distributed monitoring setups.\n"
<< " */\n" << " */\n"
<< "object ApiListener \"api\" {\n" << "object ApiListener \"api\" {\n"
<< " cert_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".crt\"\n" << " cert_path = LocalStateDir + \"/lib/icinga2/pki/\" + NodeName + \".crt\"\n"
<< " key_path = SysconfDir + \"/icinga2/pki/\" + NodeName + \".key\"\n" << " key_path = LocalStateDir + \"/lib/icinga2/pki/\" + NodeName + \".key\"\n"
<< " ca_path = SysconfDir + \"/icinga2/pki/ca.crt\"\n"; << " ca_path = LocalStateDir + \"/lib/icinga2/pki/ca.crt\"\n";
if (!bind_host.IsEmpty()) if (!bind_host.IsEmpty())
fp << " bind_host = \"" << bind_host << "\"\n"; fp << " bind_host = \"" << bind_host << "\"\n";

View File

@ -36,7 +36,7 @@ using namespace icinga;
String PkiUtility::GetPkiPath(void) String PkiUtility::GetPkiPath(void)
{ {
return Application::GetSysconfDir() + "/icinga2/pki"; return Application::GetLocalStateDir() + "/lib/icinga2/pki";
} }
String PkiUtility::GetLocalCaPath(void) String PkiUtility::GetLocalCaPath(void)