mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
[API CHANGE] New API call: sysadm/systemmanager, action="getsysctl"
Required arguments: "sysctl" (string or array of strings)
This will report back the value of the requested sysctl(s).
REST Request (example):
-------------------------------
PUT /sysadm/systemmanager
{
"action" : "getsysctl",
"sysctl" : [
"hw.usb.atp.touch_timeout",
"hw.psm.tap_timeout"
]
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"name" : "systemmanager",
"namespace" : "sysadm",
"args" : {
"action" : "getsysctl",
"sysctl" : [
"hw.usb.atp.touch_timeout",
"hw.psm.tap_timeout"
]
}
}
Response:
-------------------------------
{
"args": {
"getsysctl": {
"hw.psm.tap_timeout": "125000",
"hw.usb.atp.touch_timeout": "125000"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -586,10 +586,10 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmSystemMgmtRequest(const QJso
|
||||
ok = true;
|
||||
out->insert("reboot", sysadm::SysMgmt::systemReboot());
|
||||
}
|
||||
/*else if(act=="getsysctl"){
|
||||
else if(act=="getsysctl"){
|
||||
ok = true;
|
||||
out->insert("getsysctl", sysadm::SysMgmt::getSysctl(in_args.toObject()));
|
||||
}*/
|
||||
}
|
||||
else if(act=="setsysctl"){
|
||||
ok = true;
|
||||
out->insert("setsysctl", sysadm::SysMgmt::setSysctl(in_args.toObject()));
|
||||
|
||||
Reference in New Issue
Block a user