Add status.benpro.fr script

This commit is contained in:
Benoit S 2021-10-14 19:03:01 +09:00
parent b6c19c76a5
commit d0fe78a21e
4 changed files with 16 additions and 0 deletions

BIN
files/status.benpro.fr.sh Normal file

Binary file not shown.

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
latency="$(ping -c 5 uptime.benpro.fr | awk '{print $4}' | tail -1 | cut -d'/' -f2) ms"
URI="https://status.benpro.fr/api/push/<secret>?msg=OK&ping=${latency}"
/usr/bin/curl -s -o /dev/null "$URI"