diff --git a/monitor.py b/monitor.py
index e458145..a0a83d5 100644
--- a/monitor.py
+++ b/monitor.py
@@ -26,6 +26,7 @@
import logging
import sys
+import os
import csv
from itertools import islice
@@ -536,19 +537,20 @@ def process_message(_bmessage):
# log only to file if system is NOT OpenBridge event (not logging open bridge system, name depends on your OB definitions) AND transmit time is LONGER as 2sec (make sense for very short transmits)
if LASTHEARD_INC:
if int(float(p[9]))> 2:
+ curDir = os.getcwd()
log_lh_message = '{},{},{},{},{},{},{},TS{},TG{},{},{},{}'.format(_now, p[9], p[0], p[1], p[3], p[5], alias_call(int(p[5]), subscriber_ids), p[7], p[8],alias_tgid(int(p[8]),talkgroup_ids),p[6], alias_short(int(p[6]), subscriber_ids))
- lh_logfile = open('/opt/HBmonitor/log/lastheard.log', "a")
+ lh_logfile = open(curDir+"/log/lastheard.log", "a")
lh_logfile.write(log_lh_message + '\n')
lh_logfile.close()
# Lastheard in Dashboard by SP2ONG
my_list=[]
n=0
- f = open("/opt/HBmonitor/templates/lastheard.html", "w")
+ f = open(curDir+"/templates/lastheard.html", "w")
f.write("