#!/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