this post was submitted on 10 Nov 2023
1 points (100.0% liked)

Self-Hosted Main

515 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

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 ?

top 2 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 year ago (1 children)

Do you have permission to touche the file with the user ?

[–] [email protected] 1 points 1 year ago

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