From 8449a7c6072c13d962f4cc96d0e51b4f456f58c7 Mon Sep 17 00:00:00 2001 From: Antoine Prieels Date: Thu, 29 Aug 2019 14:09:24 +0000 Subject: [PATCH] [FIX] hw_drivers: Kill eftdvs w/o Six terminal If no Six Payment terminal is configured, kill eftdvs if it is running. When removing the configuration for a Six payment terminal, we just removed the file with the configuration but we didn't stop eftdvs. The terminal the nstayed connected to this Box even after removing the configuration, blocking the connection to another terminal. --- addons/hw_drivers/controllers/driver.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/hw_drivers/controllers/driver.py b/addons/hw_drivers/controllers/driver.py index 7326381d6de..76c4899d254 100755 --- a/addons/hw_drivers/controllers/driver.py +++ b/addons/hw_drivers/controllers/driver.py @@ -474,6 +474,11 @@ if terminal_id: eftapi = ctypes.CDLL("eftapi.so") # Library given by Six mpdm.daemon = True mpdm.start() +else: + try: + subprocess.check_call(["pkill", "9", "eftdvs"]) # Check if MPD server is running + except subprocess.CalledProcessError: + pass m = Manager() m.daemon = True