mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 02:20:17 +00:00
Update WebBackend.cpp
Fix the sysadm/pkg API class detection method to account for the new location of the "pkg" binary on TrueOS 18.06 Also fix the sysadm/update API class to look for the "trueos-update" utility.
This commit is contained in:
@@ -77,7 +77,7 @@ RestOutputStruct::ExitCode WebSocket::AvailableSubsystems(bool allaccess, QJsonO
|
||||
}
|
||||
|
||||
// - pkg
|
||||
if(QFile::exists("/usr/local/sbin/pkg")){
|
||||
if(QFile::exists("/usr/local/sbin/pkg") || QFile::exists("/usr/sbin/pkg")){
|
||||
out->insert("sysadm/pkg", "read/write");
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ RestOutputStruct::ExitCode WebSocket::AvailableSubsystems(bool allaccess, QJsonO
|
||||
out->insert("sysadm/systemmanager","read/write");
|
||||
|
||||
// - PC-BSD/TrueOS Updater
|
||||
if(QFile::exists("/usr/local/bin/pc-updatemanager")){
|
||||
if(QFile::exists("/usr/local/bin/pc-updatemanager") || QFile::exists("/usr/sbin/trueos-update")){
|
||||
out->insert("sysadm/update", "read/write");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user