I'm writing a custom application that will be run as a service/daemon. According to convention, the binaries for it should be in /opt/appname. However, where do I put files such as:
Ideally, you don't care where it's installed, and you can configure the app at build or install time. If, for example, you're building an application that will run on Debian, you can create a .deb package and skip this entire question.
If you're using
/opt/<appname>
for your app then config files go under/etc/opt
, and the rest goes under/var/opt
.source
Have a look at the Filesystem Hierarchy Standard which youd tell you what you want to know.
Ideally, you don't care where it's installed, and you can configure the app at build or install time. If, for example, you're building an application that will run on Debian, you can create a .deb package and skip this entire question.