API CHANGE: Add a new "stopupdate" action for the sysadm/update class. (no additional inputs required).

This will look for any currently-running pc-updatemanager processes and kill/stop them as needed.

Example:
{
 "id":"dummy",
 "namespace":"sysadm",
 "name":"update",
 "args": {
    "action":"stopupdate"
 }
}

Output arguments:
"args":{
  "stopupdate":{
    "result":"success" or "error:<error text>"
  }
}
This commit is contained in:
Ken Moore
2016-08-09 11:27:08 -04:00
parent d430de0fce
commit 06c71afa4a
3 changed files with 31 additions and 0 deletions

View File

@@ -581,6 +581,10 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmUpdateRequest(const QJsonVal
}else if(act=="startupdate"){
ok = true;
out->insert("startupdate", sysadm::Update::startUpdate(in_args.toObject()) );
}else if(act=="stopupdate"){
ok = true;
out->insert("stopupdate", sysadm::Update::stopUpdate() );
}
} //end of "action" key usage