Add status.benpro.fr script
This commit is contained in:
parent
b6c19c76a5
commit
d0fe78a21e
4 changed files with 16 additions and 0 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1,3 +1,4 @@
|
|||
files/sasl_passwd filter=git-crypt diff=git-crypt
|
||||
files/borgmatic.yaml filter=git-crypt diff=git-crypt
|
||||
files/zfs-scrub.sh filter=git-crypt diff=git-crypt
|
||||
files/status.benpro.fr.sh filter=git-crypt diff=git-crypt
|
||||
|
|
BIN
files/status.benpro.fr.sh
Normal file
BIN
files/status.benpro.fr.sh
Normal file
Binary file not shown.
6
files/status.benpro.fr.sh_clear
Normal file
6
files/status.benpro.fr.sh_clear
Normal 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"
|
|
@ -107,3 +107,12 @@ files.put(
|
|||
mode='700',
|
||||
)
|
||||
|
||||
files.put(
|
||||
name='Add status.benpro.fr.sh',
|
||||
src='files/status.benpro.fr.sh',
|
||||
dest='/usr/local/bin/status.benpro.fr.sh',
|
||||
user='root',
|
||||
group='root',
|
||||
mode='700',
|
||||
)
|
||||
|
||||
|
|
Reference in a new issue