mirror of
https://github.com/ShaYmez/HBmonitor.git
synced 2024-11-21 23:45:17 -05:00
Moved checking lastheard.log at program startup
This commit is contained in:
parent
277b1fc575
commit
1435f19a1c
12
monitor.py
12
monitor.py
@ -633,10 +633,6 @@ def process_message(_bmessage):
|
|||||||
lh_logfile = open(LOG_PATH+"lastheard.log", "a")
|
lh_logfile = open(LOG_PATH+"lastheard.log", "a")
|
||||||
lh_logfile.write(log_lh_message + '\n')
|
lh_logfile.write(log_lh_message + '\n')
|
||||||
lh_logfile.close()
|
lh_logfile.close()
|
||||||
try:
|
|
||||||
check_call("sed -i -e 's|\\x0||g' {}".format(LOG_PATH+"lastheard.log"), shell=True)
|
|
||||||
except CalledProcessError as err:
|
|
||||||
print(err)
|
|
||||||
# Lastheard in Dashboard by SP2ONG
|
# Lastheard in Dashboard by SP2ONG
|
||||||
my_list=[]
|
my_list=[]
|
||||||
n=0
|
n=0
|
||||||
@ -833,7 +829,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\tVersion by:\t 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\tVersion by:\t 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…
Reference in New Issue
Block a user