if
(
windows of operating system
)
then
(
state of service whose
(
display name of it = "Carbon Black Sensor"
)
| "n/a"
)
else if
(
(
exists match
(
regex "Linux CentOS (6|7)"
)
of name of operating system
)
OR
(
(
name of operating system starts with "Linux Red Hat"
)
AND
(
exists file "/etc/redhat-release" whose
(
exists line whose
(
exists match
(
regex "Red Hat Enterprise Linux (Client|Server|Workstation) release 6|7"
)
of it
)
of it
)
AND NOT exists file "/etc/vmware-release" whose
(
exists line whose
(
it contains "VMware ESX"
)
of it
)
AND NOT exists file "/etc/enterprise-release" whose
(
exists line whose
(
it contains "Enterprise Linux Enterprise Linux"
)
of it
)
)
)
)
then
(
if exists process "cbdaemon" then "Running" else "n/a"
)
else "n/a"
if (windows of operating system) then (state of service whose (display name of it = "Carbon Black Sensor") | "n/a") else if ((exists match (regex "Linux CentOS (6|7)") of name of operating system) OR ((name of operating system starts with "Linux Red Hat") AND (exists file "/etc/redhat-release" whose (exists line whose (exists match (regex "Red Hat Enterprise Linux (Client|Server|Workstation) release 6|7") of it) of it) AND NOT exists file "/etc/vmware-release" whose (exists line whose (it contains "VMware ESX") of it) AND NOT exists file "/etc/enterprise-release" whose (exists line whose (it contains "Enterprise Linux Enterprise Linux") of it)))) then (if exists process "cbdaemon" then "Running" else "n/a") else "n/a"