1
0
Fork 0
mirror of https://github.com/yavook/kiwi-backup.git synced 2024-11-22 06:53:00 +00:00

run_webhook function

This commit is contained in:
Jörn-Michael Miehe 2022-10-20 22:23:06 +02:00
parent 3501b598b4
commit 6803211e48

View file

@ -19,6 +19,19 @@ if [ -n "${GPG_PASSPHRASE}" ]; then
unset GPG_PASSPHRASE
fi
run_webhook() {
_rw_webhook_url="${1}"
_rw_message="${2}"
_rw_curl_args=""
if [ "${WEBHOOK_INSECURE}" = "1" ]; then
_rw_curl_args="--insecure"
fi
_rw_webhook_url="$(echo "${_rw_webhook_url}" | sed "s,%%MSG%%,,g" )"
curl ${_rw_curl_args} "${_rw_webhook_url}" 1>/dev/null 2>/dev/null
}
# run start webhook
curl_args=""
if [ "${WEBHOOK_INSECURE}" = "1" ]; then