executable_bash-notify 509 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. case $1 in
  3. arhont)
  4. while true; do
  5. youtube-dl -F https://www.twitch.tv/arhont_tv && notify-send --urgency=critical 'arhont_tv online'
  6. sleep $((60 * 5))
  7. done
  8. ;;
  9. mariadb)
  10. while true; do
  11. [[ $(web30 docker ps --format "'{{ .Names }} {{ .Status }}'" | awk '/mariadb/ { print $NF }') == hour* ]] \
  12. || notify-send --urgency=critical 'mariadb restarted'
  13. sleep 20
  14. done
  15. ;;
  16. esac