feat: receptor 中添加环境变量

pull/13018/head
Aaron3S 2024-04-12 12:10:19 +08:00 committed by Bryan
parent 84a71c8b3a
commit 969069dde0
1 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,8 @@ class ReceptorService:
except ValueError:
print("\n- PID file is corrupted, starting Receptor...")
os.remove(self.pid_file)
os.environ.update({'LOCAL_CONNECTION_ENABLED': '1'})
process = subprocess.Popen(self.receptor_command)
with open(self.pid_file, 'w') as f:
f.write(str(process.pid))