[Netfilter] only perform cleanup at exit if SIGTERM was recieved

This commit is contained in:
FreddleSpl0it 2024-02-02 12:57:21 +01:00
parent 39589bd441
commit c941e802d4
No known key found for this signature in database
GPG Key ID: 00E14E7634F4BEC5

View File

@ -228,12 +228,12 @@ def clear():
logger.logWarn('Error clearing redis keys F2B_ACTIVE_BANS and F2B_PERM_BANS: %s' % ex) logger.logWarn('Error clearing redis keys F2B_ACTIVE_BANS and F2B_PERM_BANS: %s' % ex)
def watch(): def watch():
logger.logInfo('Watching Redis channel F2B_CHANNEL') global pubsub
pubsub.subscribe('F2B_CHANNEL')
global quit_now global quit_now
global exit_code global exit_code
global pubsub
logger.logInfo('Watching Redis channel F2B_CHANNEL')
pubsub.subscribe('F2B_CHANNEL')
while not quit_now: while not quit_now:
try: try: