abcdefghijklmopqrstx

joined 1 year ago

thank you... that was the issue. Folder permission was set to root.

 

I have this rather simple PAPERLESS_POST_CONSUME_SCRIPT which works standalone when executed via cli in docker container.

#!/usr/bin/env bash

touch /usr/src/paperless/script/newfile

However it fails when executed after document was consumed

xxx.pdf: Error while executing post-consume script: Command '['/usr/src/paperless/script/post_consume.sh', ... ]' returned non-zero exit status 1.

I'm a bit lost

WHAT I WANT to achieve: some sort of trigger after documents where consumed, so my daily backup knows whether to run or not (background: synology btrfs snapshots are running and it bloats my storage occupation). My idea was to check for "newfile" and - if it exists - delete it and create a backup

BTW: off topic: is there any way to achieve this when a document was edited ?

โ€‹