DistroService: rename to HostService

This commit is contained in:
Ly-sec
2025-11-13 15:41:46 +01:00
parent 1288924f87
commit 4fd5865978
4 changed files with 10 additions and 10 deletions
@@ -15,7 +15,7 @@ Singleton {
property bool isReady: false
function init() {
Logger.i("DistroService", "Service started")
Logger.i("HostService", "Service started")
}
// Internal helpers
@@ -81,7 +81,7 @@ Singleton {
return l ? l.split("=")[1].replace(/"/g, "") : ""
}
root.osPretty = val("PRETTY_NAME") || val("NAME")
Logger.i("DistroService", root.osPretty)
Logger.i("HostService", root.osPretty)
const osId = (val("ID") || "").toLowerCase()
root.isNixOS = osId === "nixos" || (root.osPretty || "").toLowerCase().includes("nixos")
@@ -91,7 +91,7 @@ Singleton {
}
root.isReady = true
} catch (e) {
Logger.w("DistroService", "failed to read os-release", e)
Logger.w("HostService", "failed to read os-release", e)
}
}
}
@@ -102,10 +102,10 @@ Singleton {
const p = String(stdout.text || "").trim()
if (code === 0 && p) {
root.osLogo = `file://${p}`
Logger.i("DistroService", "found", root.osLogo)
Logger.i("HostService", "found", root.osLogo)
} else {
root.osLogo = ""
Logger.w("DistroService", "none found")
Logger.w("HostService", "none found")
}
}
stdout: StdioCollector {}