campaignd: Implement 'readonly' command, toggles RO mode
This commit is contained in:
parent
7b575ed761
commit
44eef2a76a
1 changed files with 6 additions and 0 deletions
|
@ -293,6 +293,12 @@ void server::run()
|
|||
if(ctl == "shut_down") {
|
||||
LOG_CS << "Shut down requested by admin, shutting down...\n";
|
||||
break;
|
||||
} else if(ctl == "readonly") {
|
||||
if(ctl.args_count()) {
|
||||
cfg_["read_only"] = read_only_ = utils::string_bool(ctl[1], true);
|
||||
}
|
||||
|
||||
LOG_CS << "Read only mode: " << (read_only_ ? "enabled" : "disabled") << '\n';
|
||||
} else {
|
||||
LOG_CS << "Unrecognized admin command: " << ctl.full() << '\n';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue