Process monitors itself, restarts if it faults, preserves logs

and cores. Rate-limiting for safety.
This commit is contained in:
JoelKatz
2013-03-20 06:33:29 -07:00
parent 0e34de512e
commit c5429032ed
4 changed files with 88 additions and 0 deletions

View File

@@ -149,6 +149,7 @@ int main(int argc, char* argv[])
("ledger", po::value<std::string>(), "Load the specified ledger and start from .")
("start", "Start from a fresh Ledger.")
("net", "Get the initial ledger from the network.")
("fg", "Run in the foreground.")
;
// Interpret positional arguments as --parameters.
@@ -186,6 +187,13 @@ int main(int argc, char* argv[])
}
}
if (HaveSustain() && !vm.count("parameters") && !vm.count("fg") && !vm.count("standalone"))
{
std::string logMe = DoSustain();
if (!logMe.empty())
Log(lsWARNING) << logMe;
}
if (vm.count("quiet"))
Log::setMinSeverity(lsFATAL, true);
else if (vm.count("verbose"))