PIHOLE to plugin rewrite
This commit is contained in:
@@ -200,39 +200,9 @@ def main ():
|
||||
if run:
|
||||
nmapSchedule.last_run = timeNowTZ()
|
||||
performNmapScan(db, get_all_devices(db))
|
||||
|
||||
# todo replace the scans with plugins
|
||||
# Perform a network scan via arp-scan or pihole
|
||||
# if last_network_scan + datetime.timedelta(minutes=conf.SCAN_CYCLE_MINUTES) < loop_start_time:
|
||||
# last_network_scan = loop_start_time
|
||||
# conf.cycle = 1 # network scan
|
||||
# mylog('verbose', ['[MAIN] cycle:',conf.cycle])
|
||||
# updateState(db,"Scan: Network")
|
||||
|
||||
# # scan_network()
|
||||
|
||||
# # DEBUG start ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# # Start scan_network as a process
|
||||
|
||||
# p = multiprocessing.Process(target=scan_network(db))
|
||||
# p.start()
|
||||
|
||||
# # Wait for a maximum of 3600 seconds (1h) or until process finishes
|
||||
# p.join(3600)
|
||||
|
||||
# # If thread is still active
|
||||
# if p.is_alive():
|
||||
# mylog('none', "[MAIN] scan_network running too long - let\'s kill it")
|
||||
|
||||
# # Terminate - may not work if process is stuck for good
|
||||
# p.terminate()
|
||||
# # OR Kill - will work for sure, no chance for process to finish nicely however
|
||||
# # p.kill()
|
||||
|
||||
# p.join()
|
||||
|
||||
# # DEBUG end ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# # Run splugin scripts which are set to run every timne after a scan finished
|
||||
|
||||
|
||||
# Run splugin scripts which are set to run every timne after a scans finished
|
||||
if conf.ENABLE_PLUGINS:
|
||||
run_plugin_scripts(db,'always_after_scan')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user