Closed chayleaf closed 1 year ago
Thanks for this. I am going to change this to /var/lib/scanservjs
- is that compliant? I've struggled with interpreting the FHS and reconciling it with what other apps do.
yes, you may also use systemd's StateDirectory for this. Note that fs.mkdirSync(config.previewDirectory, { recursive: true });
will be needed in app-server/src/express-configurer.js.
Also, I can't tell how the config is loaded from /etc, could you point to me how it works?
Config is loaded here:
Yes, and I see no references to /etc here found it
@sbs20 also, the app should work with empty /var - anything else makes packaging extremely annoying (it's on the level of the maintainer having to manually patch the package). I.e. the package shouldn't put any files to /var.
It may create an empty directory there, but I'd recommend not doing that, using systemd's StateDirectory instead.
Sorry for not making this clear enough above. As I mentioned already, fs.mkdirSync(config.previewDirectory, { recursive: true });
will have to be added.
Describe the bug /usr/share is only for the package's bundled data that has to be shipped with it and doesn't change at runtime. /usr may well be immutable on many systems. /var should be used for persistent runtime data. I also recommend making preview/default.jpg fall back to the package's file, so it doesn't have to be in /var.
Expected behavior Only /var being used for storing outputs