From 4b25e38f78d02050e515fa7cbe82f8d26a2de017 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 29 Jun 2022 14:27:44 -0500 Subject: Loop the kill to ensure death --- radio | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radio b/radio index dc1297a..d0c12a6 100755 --- a/radio +++ b/radio @@ -60,10 +60,16 @@ _radio_play() { } _radio_kill() { - if ! xargs -a "$RADIO_PID_FILE" kill; then + if ! [ -f "$RADIO_PID_FILE" ]; then echo >&2 "I don't think radio is running." exit 1 fi + printf >&2 '%s' "Killing radio" + while xargs -a "$RADIO_PID_FILE" kill 2>/dev/null; do + printf '.' + done + rm "$RADIO_PID_FILE" + echo exit } -- cgit 1.4.1-21-gabe81