👽
This commit is contained in:
1 parent
0b17aa140b
commit
dde4ef218a
136 files changed
+9796
No files matched your search
Executable
+20
@@ -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()
|
||||
Reference in new issue
Block a user