mirror of
https://github.com/ShaYmez/HBMonv2.git
synced 2025-05-29 04:32:28 -04:00
Moved checking lastheard.log at program startup
This commit is contained in:
parent
449c6427b7
commit
a5a85ca61c
12
monitor.py
12
monitor.py
@ -663,10 +663,6 @@ def process_message(_bmessage):
|
|||||||
lh_logfile.write(log_lh_message + '\n')
|
lh_logfile.write(log_lh_message + '\n')
|
||||||
lh_logfile.close()
|
lh_logfile.close()
|
||||||
# Lastheard in Dashboard by SP2ONG
|
# Lastheard in Dashboard by SP2ONG
|
||||||
try:
|
|
||||||
check_call("sed -i -e 's|\\x0||g' {}".format(LOG_PATH+"lastheard.log"), shell=True)
|
|
||||||
except CalledProcessError as err:
|
|
||||||
print(err)
|
|
||||||
my_list=[]
|
my_list=[]
|
||||||
n=0
|
n=0
|
||||||
f = open(PATH+"templates/lastheard.html", "w")
|
f = open(PATH+"templates/lastheard.html", "w")
|
||||||
@ -942,7 +938,13 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
logging.info('monitor.py starting up')
|
logging.info('monitor.py starting up')
|
||||||
logger.info('\n\n\tCopyright (c) 2016, 2017, 2018, 2019\n\tThe Regents of the K0USY Group. All rights reserved.\n\n\tPython 3 port:\n\t2019 Steve Miller, KC1AWV <smiller@kc1awv.net>\n\n\tHBMonitor v2 SP2ONG 2019-2021\n\n')
|
logger.info('\n\n\tCopyright (c) 2016, 2017, 2018, 2019\n\tThe Regents of the K0USY Group. All rights reserved.\n\n\tPython 3 port:\n\t2019 Steve Miller, KC1AWV <smiller@kc1awv.net>\n\n\tHBMonitor v2 SP2ONG 2019-2021\n\n')
|
||||||
|
# Check lastheard.log file
|
||||||
|
if os.path.isfile(LOG_PATH+"lastheard.log"):
|
||||||
|
try:
|
||||||
|
check_call("sed -i -e 's|\\x0||g' {}".format(LOG_PATH+"lastheard.log"), shell=True)
|
||||||
|
logging.info('Check lastheard.log file')
|
||||||
|
except CalledProcessError as err:
|
||||||
|
print(err)
|
||||||
# Download alias files
|
# Download alias files
|
||||||
result = try_download(PATH, PEER_FILE, PEER_URL, (FILE_RELOAD * 86400))
|
result = try_download(PATH, PEER_FILE, PEER_URL, (FILE_RELOAD * 86400))
|
||||||
logging.info(result)
|
logging.info(result)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user