[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.
This commit is contained in:
Antoine Prieels
2019-08-29 14:09:24 +00:00
parent 1becb2e0cf
commit 8449a7c607
+5
View File
@@ -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