From a42f160ed264a330b955448546f65a0321e52fd8 Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Tue, 8 Dec 2020 18:58:31 +0100 Subject: [PATCH] make modemmonitor's dbus hooks more robust and prevent being triggered multiple times --- scripts/modem/sxmo_modemmonitor.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/modem/sxmo_modemmonitor.sh b/scripts/modem/sxmo_modemmonitor.sh index 946e221..cceb8a2 100755 --- a/scripts/modem/sxmo_modemmonitor.sh +++ b/scripts/modem/sxmo_modemmonitor.sh @@ -165,19 +165,19 @@ mainloop() { # Monitor for incoming calls dbus-monitor --system "interface='org.freedesktop.ModemManager1.Modem.Voice',type='signal',member='CallAdded'" | \ while read -r line; do - checkforincomingcalls + echo "$line" | grep -E "^signal" && checkforincomingcalls done & # Monitor for incoming texts dbus-monitor --system "interface='org.freedesktop.ModemManager1.Modem.Messaging',type='signal',member='Added'" | \ while read -r line; do - checkfornewtexts + echo "$line" | grep -E "^signal" && checkfornewtexts done & # Monitor for finished calls dbus-monitor --system "interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',arg0='org.freedesktop.ModemManager1.Call'" | \ while read -r line; do - checkforfinishedcalls + echo "$line" | grep -E "^signal" && checkforfinishedcalls done & wait