mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-09-26 14:46:52 +02:00
Use utils to get paths
This commit is contained in:
@@ -99,7 +99,7 @@ func printDbDetails() {
|
|||||||
|
|
||||||
// IsSystemReady : Checks hability of the service to execute commands (Only after "edgebox --build" is ran at least once via SSH, or if built for distribution)
|
// IsSystemReady : Checks hability of the service to execute commands (Only after "edgebox --build" is ran at least once via SSH, or if built for distribution)
|
||||||
func isSystemReady() bool {
|
func isSystemReady() bool {
|
||||||
_, err := os.Stat("/home/system/components/ws/.ready")
|
_, err := os.Stat(utils.GetPath(utils.WsPath) + ".ready")
|
||||||
return !os.IsNotExist(err)
|
return !os.IsNotExist(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ func getDevicesSpaceUsage(devices []Device) []Device {
|
|||||||
|
|
||||||
edgeappsDirSize, _ := getDirSize(utils.GetPath(utils.EdgeAppsPath))
|
edgeappsDirSize, _ := getDirSize(utils.GetPath(utils.EdgeAppsPath))
|
||||||
// TODO for later: Figure out to get correct paths for each partition...
|
// TODO for later: Figure out to get correct paths for each partition...
|
||||||
wsAppDataDirSize, _ := getDirSize("/home/system/components/ws/appdata")
|
wsAppDataDirSize, _ := getDirSize(utils.GetPath(utils.WsPath) + "/appdata")
|
||||||
|
|
||||||
if partition.Mountpoint == "/" {
|
if partition.Mountpoint == "/" {
|
||||||
edgeappsUsageSplit = edgeappsDirSize + wsAppDataDirSize
|
edgeappsUsageSplit = edgeappsDirSize + wsAppDataDirSize
|
||||||
|
|||||||
Reference in New Issue
Block a user