Post-consumption hook logging debug information
This example is a post-consumption hook writing debug
information to its output.
Paperless always appends a few arguments while all relevant information comes
from environment variables. A wrapper script is the easiest way to ignore the
additional arguments:
#!/bin/bash
set -e -u -o pipefail
exec /usr/local/bin/postconsume-dump
Then configure Paperless to use the post-consumption hook:
PAPERLESS_POST_CONSUME_SCRIPT=/usr/local/hooks/postconsume