From 9ff3fcc7972fdd3918c59d4e4924209ec770d775 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 28 Apr 2016 17:01:35 +0200 Subject: [PATCH] (captive portal) catch exception for process_accounting_messages.php --- .../scripts/OPNsense/CaptivePortal/cp-background-process.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py b/src/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py index d825bc82d..902fc2716 100755 --- a/src/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py +++ b/src/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py @@ -220,7 +220,11 @@ def main(): bgprocess.db.close() # process accounting messages (uses php script, for reuse of Auth classes) - subprocess.call(['/usr/local/opnsense/scripts/OPNsense/CaptivePortal/process_accounting_messages.php']) + try: + subprocess.call(['/usr/local/opnsense/scripts/OPNsense/CaptivePortal/process_accounting_messages.php']) + except OSError: + # if accounting script crashes don't exit backgroung process + pass # sleep time.sleep(5)