TL;DR: The RC scripts (paperless-[beat|consumer|flower|migrate|webui|worker]) all have the 'load_rc_config' call after the rc.conf variables are accessed. As a result, they always use the default values. Long version: I wanted to use gunicorn directly to access the service on my local network, instead of using nginx. So I made the static dir change that the man page suggests for that and started the 'paperless-webui' service. It wasn't accessible from other machines. Inspecting '/var/log/daemon.log' showed that the webui was: > Listening at: http://127.0.0.1:8000 I checked the 'paperless-webui' RC script and found it used a 'paperless_webui_listen_address' variable with a default value of '127.0.0.1', so I set that to 'paperless_webui_listen_address="0.0.0.0"' on my /etc/rc.conf file and restarted the webui service. It still didn't work, and I could see that it was still listening on '127.0.0.1'. By checking the RC scripting docs, I saw: https://docs.freebsd.org/en/articles/rc-scripting/#rcng-confdummy > ➋ Now load_rc_config is invoked earlier in the script, before any rc.conf(5) variables are accessed. I checked the RC script and verified that this was not the case, for any of them. Moving 'load_rc_config' to before the variables are accessed fixed it for me, now my setting to listen on '0.0.0.0' is being respected.
Thanks for reporting, will be fixed in the next port revision.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d716cbc8e98a9410782bbad8139f7b6457920e5b commit d716cbc8e98a9410782bbad8139f7b6457920e5b Author: Michael Gmelin <grembo@FreeBSD.org> AuthorDate: 2024-04-24 12:39:17 +0000 Commit: Michael Gmelin <grembo@FreeBSD.org> CommitDate: 2024-04-24 21:56:50 +0000 deskutils/py-paperless-ngx: Fixes and improvements - Fix NLTK configuration in paperless.conf.sample - Mention snowball_data in NLTK instructions - Fix sad defect that prevented rc scripts from picking up configuration data from rc.conf - Improve startup script documentation - Document required ACL when using a remote redis instance - Document how to enable JBIG2 and its potential pitfalls PR: 278424, 278425, 278426 Reported by: anonymous bugzilla user, netchild MFH: 2024Q2 deskutils/py-paperless-ngx/Makefile | 1 + deskutils/py-paperless-ngx/files/paperless-beat.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-consumer.in | 8 +++++--- .../py-paperless-ngx/files/paperless-flower.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-migrate.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-ngx.7.in | 24 +++++++++++++++++++--- .../py-paperless-ngx/files/paperless-webui.in | 20 +++++++++++------- .../py-paperless-ngx/files/paperless-worker.in | 12 ++++++----- .../files/patch-paperless.conf.example | 10 ++++----- deskutils/py-paperless-ngx/files/pkg-message.in | 21 +++++++++++++++++++ 10 files changed, 93 insertions(+), 39 deletions(-)
A commit in branch 2024Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=27a97f780c56cf51b482aa828ad0e20e24f23fcc commit 27a97f780c56cf51b482aa828ad0e20e24f23fcc Author: Michael Gmelin <grembo@FreeBSD.org> AuthorDate: 2024-04-24 12:39:17 +0000 Commit: Michael Gmelin <grembo@FreeBSD.org> CommitDate: 2024-04-24 23:09:18 +0000 deskutils/py-paperless-ngx: Fixes and improvements - Fix NLTK configuration in paperless.conf.sample - Mention snowball_data in NLTK instructions - Fix sad defect that prevented rc scripts from picking up configuration data from rc.conf - Improve startup script documentation - Document required ACL when using a remote redis instance - Document how to enable JBIG2 and its potential pitfalls PR: 278424, 278425, 278426 Reported by: anonymous bugzilla user, netchild MFH: 2024Q2 (cherry picked from commit d716cbc8e98a9410782bbad8139f7b6457920e5b) deskutils/py-paperless-ngx/Makefile | 1 + deskutils/py-paperless-ngx/files/paperless-beat.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-consumer.in | 8 +++++--- .../py-paperless-ngx/files/paperless-flower.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-migrate.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-ngx.7.in | 24 +++++++++++++++++++--- .../py-paperless-ngx/files/paperless-webui.in | 20 +++++++++++------- .../py-paperless-ngx/files/paperless-worker.in | 12 ++++++----- .../files/patch-paperless.conf.example | 10 ++++----- deskutils/py-paperless-ngx/files/pkg-message.in | 21 +++++++++++++++++++ 10 files changed, 93 insertions(+), 39 deletions(-)