mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 20:10:08 +02:00
👌 Cleanup HomebrewDiagnostics
This commit is contained in:
@ -18,17 +18,4 @@ struct HomebrewService: Decodable, Equatable {
|
||||
let status: String?
|
||||
let log_path: String?
|
||||
let error_log_path: String?
|
||||
|
||||
public static let serviceToCheck = "nginx"
|
||||
public static func servicesCanBeLoaded() -> Bool {
|
||||
let serviceInfo = try? JSONDecoder().decode(
|
||||
[HomebrewService].self,
|
||||
from: Shell.pipe(
|
||||
"sudo \(Paths.brew) services info \(self.serviceToCheck) --json",
|
||||
requiresPath: true
|
||||
).data(using: .utf8)!
|
||||
)
|
||||
|
||||
return serviceInfo != nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user