Expose node

This commit is contained in:
Peter J. Holzer 2023-01-07 13:26:40 +01:00 committed by Peter J. Holzer
parent fdf782bc2f
commit ed3f7872e9
1 changed files with 2 additions and 1 deletions

View File

@ -7,8 +7,9 @@ import time
import requests import requests
node = socket.gethostbyaddr(socket.gethostname())[0]
def record_observations(observations): def record_observations(observations):
node = socket.gethostbyaddr(socket.gethostname())[0]
for dir in (".", os.environ["HOME"] + "/.config/ltsdb", "/etc/ltsdb"): for dir in (".", os.environ["HOME"] + "/.config/ltsdb", "/etc/ltsdb"):
try: try:
with open(dir + "/config.json") as fh: with open(dir + "/config.json") as fh: