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:
parent
3501b598b4
commit
6803211e48
1 changed files with 13 additions and 0 deletions
|
@ -19,6 +19,19 @@ if [ -n "${GPG_PASSPHRASE}" ]; then
|
||||||
unset GPG_PASSPHRASE
|
unset GPG_PASSPHRASE
|
||||||
fi
|
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
|
# run start webhook
|
||||||
curl_args=""
|
curl_args=""
|
||||||
if [ "${WEBHOOK_INSECURE}" = "1" ]; then
|
if [ "${WEBHOOK_INSECURE}" = "1" ]; then
|
||||||
|
|
Loading…
Reference in a new issue