Simplify and prevent killing existing mpv instances

Instead of the trigger file and killing mpv, we loop the ring
indefinitely until killed. Maybe we should still got a guardrail but I
still never needed it (modemmonitor would trigger missed_call late or
later ?)

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Stacy Harper 2021-04-06 22:04:22 +02:00 committed by Maarten van Gompel
parent 65270eaea8
commit df73a9af1c
3 changed files with 16 additions and 24 deletions

View file

@ -3,6 +3,7 @@
# This script is executed (asynchronously) when you missed a call
# You can use it to play a ring tone
#we simply remove the ring trigger file
#written by the ring hook and the ringing will stop
rm /tmp/ring.trigger
# kill existing ring playback
MPVID="$(cat "$XDG_RUNTIME_DIR/sxmo.ring.pid")"
kill $MPVID
rm "$XDG_RUNTIME_DIR/sxmo.ring.pid"