Commit f98ef4ce authored by root's avatar root

Little fixes

parent 8681bde0
...@@ -4,7 +4,7 @@ from setproctitle import setproctitle ...@@ -4,7 +4,7 @@ from setproctitle import setproctitle
from shell_cmd import sh from shell_cmd import sh
from nfstream import NFStreamer from nfstream import NFStreamer
import time import time
import sys import sys, signal
import json import json
deftimeout="3600" deftimeout="3600"
...@@ -67,6 +67,28 @@ except: ...@@ -67,6 +67,28 @@ except:
Cats = R['Cats'] Cats = R['Cats']
Apps = R['Apps'] Apps = R['Apps']
def reloadconf(signum, frame):
global Cats
global Apps
try:
fconf = open("/etc/nexdpi/dpirules.json", "r")
R=json.loads(fconf.read())
fconf.close()
Cats = R['Cats']
Apps = R['Apps']
print("Rules file reloaded")
except:
print("Error loading rules file.")
signal.signal(signal.SIGHUP, reloadconf)
Cats = R['Cats']
Apps = R['Apps']
UnknownMatch=[] UnknownMatch=[]
class NexDPI(): class NexDPI():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment