mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
Firewall/alias/geoip. make sure to trigger a download if no stats are found. Which should fix startup issues when aliases don't require a change and a new valid subscription is entered.
This commit is contained in:
parent
f3adf835ef
commit
ce2b145185
@ -39,6 +39,7 @@ import syslog
|
||||
import subprocess
|
||||
import glob
|
||||
from lib.alias import Alias
|
||||
import lib.geoip as geoip
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
|
||||
|
||||
@ -109,6 +110,10 @@ if __name__ == '__main__':
|
||||
if not os.path.isdir('/var/db/aliastables'):
|
||||
os.makedirs('/var/db/aliastables')
|
||||
|
||||
# make sure we download geoip data if not found. Since aliases only will trigger a download when change requires it
|
||||
if not os.path.isfile('/usr/local/share/GeoIP/alias.stats'):
|
||||
geoip.download_geolite()
|
||||
|
||||
try:
|
||||
source_tree = ET.ElementTree(file=inputargs.source_conf)
|
||||
except ET.ParseError as e:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user