1

I have a project that comprises a bunch of different files (listed below). I'm creating an install script for it, and want to make sure they all go in the right place from a unix hierarchy perspective.

  • There's the main script that does most of the lifting work.
  • There's a script that starts a particular kernel module in the right way.
    • [Both the above scripts are started at boot by .service files in systemd]
  • There's a couple of filesystems (just .bin files) that are used by the kernel module mentioned above
  • There needs to be a write-accessible (to the main script at least) directory to keep files that are currently being run by the program. This isn't temporary and needs to persist after boot.

I asked on twitter and received options ranging from /opt/pishift, to /usr/local/share, to ~/.pishift/, to /usr/local/bin, to ~/pishift or /etc/pishift.

The main script will not need to be run by the user, as it'll be started on boot by systemd - so I think that means I shouldn't put it in /usr/local/bin, as then it'd be in their path.

If you're looking for more context regarding the question, the project is here: https://github.com/tomhartley/pishift

0

The best thing would be to try to find where your sofware fits in FHS. Being run by systemd makes me think that the best place is /opt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.