0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd:Ⓜ️:app: Additional conf item to enable w/ persist.

This commit is contained in:
Jason Volk 2020-10-27 01:58:02 -07:00
parent 5c1980da70
commit 5ed2022517
2 changed files with 15 additions and 0 deletions

View file

@ -17,6 +17,7 @@ struct ircd::m::app
:instance_list<ircd::m::app> :instance_list<ircd::m::app>
{ {
static log::log log; static log::log log;
static conf::item<bool> enable;
static conf::item<std::string> path; static conf::item<std::string> path;
static std::set<std::string> bin; static std::set<std::string> bin;

View file

@ -22,6 +22,14 @@ ircd::m::app::path
{ "persist", false }, { "persist", false },
}; };
decltype(ircd::m::app::enable)
ircd::m::app::enable
{
{ "name", "ircd.m.app.enable" },
{ "default", true },
};
decltype(ircd::m::app::bin) decltype(ircd::m::app::bin)
ircd::m::app::bin; ircd::m::app::bin;
@ -106,6 +114,12 @@ ircd::m::app::app(const m::event::idx &event_idx)
"Configure the 'ircd.m.app.path' to permit." "Configure the 'ircd.m.app.path' to permit."
}; };
if(!enable)
throw m::FORBIDDEN
{
"Configure 'ircd.m.app.enable' to permit."
};
const json::string file const json::string file
{ {
arg.at(0) arg.at(0)