[ADD] Hibou Athene, upstream builds, and runconfig for Odoo

This commit is contained in:
Jared Kipe
2021-12-09 19:08:41 -08:00
parent e879cda87e
commit 7f6417aae2
6 changed files with 114 additions and 0 deletions

24
odoo-reload.py Executable file
View File

@@ -0,0 +1,24 @@
import psutil
import os
import signal
PID = 1
PNAME = 'odoo'
is_foreground = False
for proc in psutil.process_iter():
try:
process_name = proc.name()
process_id = proc.pid
if process_id == PID:
is_foreground = process_name == PNAME
break
except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
pass
if not is_foreground:
print('Odoo is not the foreground process.')
exit(-1)
print('Signalling reload to Odoo')
os.kill(PID, signal.SIGHUP)