mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
Add new iocage API call to clean all jails.
REST Request:
-------------------------------
PUT /sysadm/iocage
{
"action" : "cleanjails"
}
WebSocket Request:
-------------------------------
{
"namespace" : "sysadm",
"args" : {
"action" : "cleanjails"
},
"id" : "fooid",
"name" : "iocage"
}
Response:
-------------------------------
{
"args": {
"cleanjails": {
"success": "All jails have been cleaned."
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -389,6 +389,10 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmIocageRequest(const QJsonVal
|
||||
bool ok = false;
|
||||
if(keys.contains("action")){
|
||||
QString act = JsonValueToString(in_args.toObject().value("action"));
|
||||
if(act=="cleanjails"){
|
||||
ok = true;
|
||||
out->insert("cleanjails", sysadm::Iocage::cleanJails());
|
||||
}
|
||||
if(act=="capjail"){
|
||||
ok = true;
|
||||
out->insert("capjail", sysadm::Iocage::capJail(in_args.toObject()));
|
||||
|
||||
Reference in New Issue
Block a user