Page 1 of 1

Help needed with FHS compliant installation

Posted: Wednesday 11 November 2015 23:59
by Lomax
Hi all,

I'm not happy with Domoticz residing in a user's home directory, and would like to install in properly instead. Currently, if I do a "sudo make install" after compiling, the whole shebang ends up in /opt, which is wrong in so many ways. Is there any way to get Domoticz to play nice with the Linux file system hierarchy? Ideally, I would like to have:
  • Config file(s) in /etc
  • Binaries in /usr/sbin (or /usr/bin)
  • Web UI files in /var/www (or /usr/share)
  • Log files in /var/log
  • Database in /usr/local (or /usr/local/var)
In all cases inside a subdirectory called "domoticz". This is how most Linux software works these days and conforming to FHS would make Domoticz both safer and easier to use (often these are the same thing). Has anyone done this? If not, is it at all possible?

Re: Help needed with FHS compliant installation

Posted: Friday 13 November 2015 19:47
by ro.
I recently went through a similar exercise myself, though I wasn't striving for FHS compliance. I don't think there is enough flexibility as things stand: there's only
the compile option CMAKE_INSTALL_PREFIX which sets the paths for scripts and www files, and the command-line -userdata option for all the "live" data (database, logs, backups). But that was good enough for me - I just wanted to move stuff out of my own build directory - except domocookie.txt doesn't respect -userdata, for which I have a patch.

Re: Help needed with FHS compliant installation

Posted: Sunday 15 November 2015 2:29
by Lomax
Perfect, thank you very much!