You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

9 lines
312B

  1. #!/bin/bash
  2. ntfy_url=$1
  3. while echo  offline
  4. do
  5. curl -sN --proto-default https --retry 60 --retry-delay 1 --retry-max-time 60 --keepalive-time 1 $ntfy_url |\
  6. jq --unbuffered -r 'select(.event == "message" or .event == "open")|if .event == "message" then .message else "🖧 online" end';
  7. sleep 1;
  8. done