cockpit-plugin-base-react - v1.1.1
    Preparing search index...

    Function getServiceStatus

    • Returns the current ServiceStatus of a systemd unit.

      Checks with command -v first — returns "not-installed" when the unit binary is absent. Then calls systemctl is-active and maps the output to a ServiceStatus value.

      Parameters

      • unit: string

        The systemd unit name (e.g. "nginx.service").

      Returns Promise<ServiceStatus>