1
0
Fork 0
mirror of https://github.com/yavook/kiwi-backup.git synced 2025-12-13 04:03:01 +00:00
kiwi-backup/libexec/kiwi-backup/run_webhook
2022-10-24 04:01:40 +02:00

17 lines
338 B
Bash
Executable file

#!/bin/sh
message="$(echo "${2}" | sed "s,\s,%20,g" )"
webhook_url="$(echo "${1}" | sed "s,%%MSG%%,${message},g" )"
webhook_insecure="${3:-0}"
if [ -z "${webhook_url}" ]; then
exit 1
fi
curl_args=""
if [ "${webhook_insecure}" = "1" ]; then
curl_args="--insecure"
fi
curl ${curl_args} "${webhook_url}" 1>/dev/null 2>/dev/null