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 Jun 7, 2023
1 parent 3276cc9 commit 4032cdb
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 @@ -375,4 +375,13 @@ void NodeUtility::UpdateConstant(const String& name, const String& value)

ifp.close();
ofp.Commit();

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 4032cdb

Please sign in to comment.