def status(name, sig=None):
    if sig:
        return bool(__salt__['status.pid'](sig))
    cmd = ['service', name, 'status']
    if _service_is_upstart(name):
        # decide result base on cmd output, thus ignore retcode,
        # which makes cmd output not at error lvl even when cmd fail.
        return 'start/running' in __salt__['cmd.run'](cmd, python_shell=False,
                                                      ignore_retcode=True)
    # decide result base on retcode, thus ignore output (set quite)
    # because there is no way to avoid logging at error lvl when
    # service is not running - retcode != 0 (which is totally relevant).
    return not bool(__salt__['cmd.retcode'](cmd, python_shell=False,
                                            quite=True))
Return the status for a service, returns a bool whether the service is
dataset/ETHPy150Open saltstack/salt/salt/modules/upstart.py/status