mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-22 15:28:02 +01:00
12 lines
334 B
Text
12 lines
334 B
Text
|
#!/bin/bash
|
||
|
set -uo pipefail
|
||
|
RID=`uuidgen`
|
||
|
BASE_URL="https://hc-ping.com/{{ healthcheck_webhook_token }}/$1"
|
||
|
START_URL="$BASE_URL/start?rid=$RID"
|
||
|
shift
|
||
|
|
||
|
curl -A "ubuntu-vm" -fsS --retry 5 -o /dev/null $START_URL
|
||
|
logs=$($@ 2>&1)
|
||
|
status=$?
|
||
|
curl -A "ubuntu-vm" -fsS --retry 5 --data-raw "$logs" -o /dev/null "$BASE_URL/$status?rid=$RID"
|