def check_sh_is_running(pidfile):
"""
This method deamonizes the sh.py process and redirects standard file descriptors.
:param pidfile: Name of the pidfile to check
:type pidfile: str
:return: True: if SmartHomeNG is running, False: if SmartHome is not running
:rtype: bool
"""
pid = read_pidfile(pidfile)
return psutil.pid_exists(pid) if pid > 0 else False
评论列表
文章目录