diff options
Diffstat (limited to 'sh/dynotify_sh')
-rwxr-xr-x | sh/dynotify_sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sh/dynotify_sh b/sh/dynotify_sh new file mode 100755 index 0000000..16988b1 --- /dev/null +++ b/sh/dynotify_sh @@ -0,0 +1,14 @@ +#!/bin/sh + +up= +while :; do + if [ "$(curl -s https://www.douyu.com/betard/"$1" | jq '.room.show_status')" -eq 1 ]; then + if ! [ "$up" ]; then + notify-send "$2开播" + up=1 + fi + else + [ "$up" ] && up= + fi + sleep 60 +done |