Skip to content

Commit

Permalink
Node setup: auto-store ticket salt
Browse files Browse the repository at this point in the history
... not to have to run daemon -C after node wizard before pki ticket.

refs #8072
  • Loading branch information
Al2Klimov committed Dec 14, 2020
1 parent b06ea2b commit dec6360
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/cli/nodeutility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,13 @@ void NodeUtility::UpdateConstant(const String& name, const String& value)
ofp.close();

Utility::RenameFile(tempFile, constantsConfPath);

std::ofstream vars;
vars.exceptions(vars.eofbit | vars.failbit | vars.badbit);
vars.open(Configuration::VarsPath.CStr(), vars.out | vars.binary | vars.ate);

NetString::WriteStringToStream(vars, JsonEncode(new Dictionary({
{ "name", name },
{ "value", value }
})));
}

0 comments on commit dec6360

Please sign in to comment.