docker-apps/radicale/webhooks/radicale.sh

16 lines
338 B
Bash

#!/bin/sh
USER="$1"
PATH_="$2"
REQUEST="$3"
# Only fire on actual writes
case "$REQUEST" in
PUT|DELETE) ;;
*) exit 0 ;;
esac
curl -s -X POST $WEBHOOKS_URI/on-change \
-H "Content-Type: application/json" \
-H "X-Secret: RUCVDCATrwtYlCT680FSW4IT1PrvkLB9" \
-d "{\"user\":\"$USER\",\"path\":\"$PATH_\",\"request\":\"$REQUEST\"}"