Broken and inconsistent getDataDir() and getRuntimeDir()
mheily opened this issue · comments
The values of getDataDir() and getRuntimeDir() are used improperly in some cases. They aren't created as needed. The wrong XDG_* variables were being used in some cases. None of the environment variables are documented in the manpage. MacOS is a very special case.
Review all uses of libjob directory variables, and make them consistent, documented, and correct.
I committed some half-broken crap that now leaves everything in a terrible state.
$ ./jobd/jobd -fv
ERROR: Cannot open or create pidfile:
Things are better now, but not tested very heavily.
Still need:
- config dir to hold manifests that are auto-loaded at jobd start time, e.g. etc/job.d
- conffile, e.g. etc/jobd.conf
- local state dir.. XDG fails at this but .local/state proposed: https://wiki.debian.org/XDGBaseDirectorySpecification
Maybe have a bootstrap IPC socket from root-level that creates /var/run/jobd/user/$UID and /var/db/jobd/user/$UID.. (??? would need quotas ???)