mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Add a new API call: sysadm/pkg, "action"="pkg_upgrade".
This will have pkg upgrade all currently-installed packages.
NOTE: The actual information will be returned as a Dispatcher event - this API call just queues up the pkg operation (limitation of pkg - only one process call at a time)
REST Request:
-------------------------------
PUT /sysadm/pkg
{
"action" : "pkg_upgrade"
}
WebSocket Request:
-------------------------------
{
"args" : {
"action" : "pkg_upgrade"
},
"name" : "pkg",
"namespace" : "sysadm",
"id" : "fooid"
}
Response:
-------------------------------
{
"args": {
"pkg_upgrade": {
"proc_cmd": "pkg upgrade -y",
"proc_id": "sysadm_pkg_upgrade-{19ace7c9-0d83-4a0d-9249-0b56cb105762}",
"status": "pending"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -756,7 +756,7 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmPkgRequest(const QJsonValue
|
||||
}else if(act=="pkg_check_upgrade"){
|
||||
|
||||
}else if(act=="pkg_upgrade"){
|
||||
|
||||
out->insert("pkg_upgrade", sysadm::PKG::pkg_upgrade());
|
||||
}else if(act=="pkg_audit"){
|
||||
out->insert("pkg_audit", sysadm::PKG::pkg_audit());
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user