Updated the detection script to check for the name of the threaded daemon.

This commit is contained in:
Erik Thuning 2023-04-04 11:43:13 +02:00
parent 15dfc2076c
commit bca706c7c8

@ -1,8 +1,7 @@
import psutil
def is_running():
for i in psutil.pids():
p = psutil.Process(i)
if p.name() == 'python3' and '/opt/play-daemon/daemon' in p.cmdline():
for p in psutil.process_iter():
if p.name() == 'python3' and 'play-daemon.py' in p.cmdline():
return True
return False