0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +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>
{
static log::log log;
static conf::item<bool> enable;
static conf::item<std::string> path;
static std::set<std::string> bin;

View file

@ -22,6 +22,14 @@ ircd::m::app::path
{ "persist", false },
};
decltype(ircd::m::app::enable)
ircd::m::app::enable
{
{ "name", "ircd.m.app.enable" },
{ "default", true },
};
decltype(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."
};
if(!enable)
throw m::FORBIDDEN
{
"Configure 'ircd.m.app.enable' to permit."
};
const json::string file
{
arg.at(0)