This commit is contained in:
sankalp committed 2023-04-24 15:41:27 +05:45
1 parent 0b17aa140b
commit dde4ef218a
136 files changed
+9796

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env python
import subprocess
import os
def launch_logger():
logger_path = os.path.join("scripts", "logger.py")
try:
# Check if logger.py is already running
subprocess.check_output(["pidof", "-x", "python", logger_path])
print("logger.py is already running")
except subprocess.CalledProcessError:
# logger.py is not running, launch it
subprocess.Popen(["python", logger_path, "init", "&"])
print("logger.py has been launched")
if __name__ == "__main__":
launch_logger()