mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-12-23 06:21:55 +01:00
11 lines
334 B
Django/Jinja
Executable file
11 lines
334 B
Django/Jinja
Executable file
#!/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"
|