diff options
author | Case Duckworth | 2022-06-29 14:27:44 -0500 |
---|---|---|
committer | Case Duckworth | 2022-06-29 14:27:44 -0500 |
commit | 4b25e38f78d02050e515fa7cbe82f8d26a2de017 (patch) | |
tree | b7346e5da49e20c75b8943d5d28f4d0bcf465b26 | |
parent | Add radio.stations (diff) | |
download | radio-4b25e38f78d02050e515fa7cbe82f8d26a2de017.tar.gz radio-4b25e38f78d02050e515fa7cbe82f8d26a2de017.zip |
Loop the kill to ensure death
-rwxr-xr-x | radio | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/radio b/radio index dc1297a..d0c12a6 100755 --- a/radio +++ b/radio | |||
@@ -60,10 +60,16 @@ _radio_play() { | |||
60 | } | 60 | } |
61 | 61 | ||
62 | _radio_kill() { | 62 | _radio_kill() { |
63 | if ! xargs -a "$RADIO_PID_FILE" kill; then | 63 | if ! [ -f "$RADIO_PID_FILE" ]; then |
64 | echo >&2 "I don't think radio is running." | 64 | echo >&2 "I don't think radio is running." |
65 | exit 1 | 65 | exit 1 |
66 | fi | 66 | fi |
67 | printf >&2 '%s' "Killing radio" | ||
68 | while xargs -a "$RADIO_PID_FILE" kill 2>/dev/null; do | ||
69 | printf '.' | ||
70 | done | ||
71 | rm "$RADIO_PID_FILE" | ||
72 | echo | ||
67 | exit | 73 | exit |
68 | } | 74 | } |
69 | 75 | ||