Help needed with FHS compliant installation

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
Lomax
Posts: 32
Joined: Monday 18 May 2015 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: United Kingdom
Contact:

Help needed with FHS compliant installation

Post 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?
ro.
Posts: 13
Joined: Thursday 10 October 2013 16:05
Target OS: Linux
Domoticz version: 2.3476
Location: UK
Contact:

Re: Help needed with FHS compliant installation

Post 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.
Lomax
Posts: 32
Joined: Monday 18 May 2015 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: United Kingdom
Contact:

Re: Help needed with FHS compliant installation

Post by Lomax »

Perfect, thank you very much!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest