According to https://www.freedesktop.org/software/systemd/man/systemd.unit.html, the default unit path is…
- /etc/systemd/system: Local configuration
- /run/systemd/system: Runtime units
- /usr/lib/systemd/system: Units of installed packages
If I am writing a script to install software to a server, not using a package manager, none of these locations seems to be technically correct.
Since this is being set up by an installer script, /usr/lib/systemd/system directory seems more right than /etc/systemd/system, even though the Linux distro's package manager is not being used. Is that right?
I thought about trying to modify the
SYSTEMD_UNIT_PATH to incude something like /opt/lib/systemd/system, but I'm pretty sure that is a bad idea.