3 ms·
This is an already solved problem: - package everything, *especially configuration*; - executables in /opt/someprefix/bin, no extensions; - daemons (serv
by Annatar 4y ago
This is an already solved problem:
- package everything, *especially configuration*;
- executables in /opt/someprefix/bin, no extensions;
- daemons (services), executables with elevated privileges go into /opt/someprefix/sbin/;
- read only data which the application needs to run goes int /opt/someprefix/share/application/;
- logs should be streamed to syslogd, for example via the logger utility, so that centrally configured OS logging is honored and the application doesn't vomit out log files arbitrarily or at arbitrary, private locations;
- application data should go to /var/opt/someprefix/application/;
- configuration in /etc/opt/someprefix[/application] (if more than one configration file, otherwise /etc/opt/someprefix/);
- configuration files should have a .conf or .cf postfix, and should be plain ASCII text files, but not YAML, JSON, or XML.
These are industry norms, formally written as specifications:
https://illumos.org/man/7/intro https://illumos.org/man/7/intro
https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#etcoptConfigurationFilesForOpt https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#et...
https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#optAddonApplicationSoftwarePackages https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#op...
https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varoptVariableDataForOpt https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#va...
...and most important of all: deliver quality manual pages in /opt/someprefix/share/man for your tools, with lots of examples! No wikis, markups, HTML web pages, none of that junk: straight, honest to goodness manual pages available at one's fingertips on the command line.