It has provided one since version 1.5. It erroneously hardcodes the
libdir as "lib" (it may be lib64), but OwnTracks defaulted to "lib"
anyway. I will fix Mosquitto shortly.
This is done in a cross-compile-friendly manner with cpp rather than
uname. printf is used rather than echo due to inconsistent handling of
the -e option across different shells.
This isn't really a great place for these, and they're not very complete
anyway. Better to put this in the proper docs, where it'll be obvious
and complete.
Add the standard OwnTracks MQTT topic as the first argument to
`ot-recorder` in the service file. This provides a usable experience out
of the box (otherwise the service file will fail with a help message).
If the user is on systemd it's reasonable to assume that they are also
using journald. This is the default on most (all?) systemd systems and
any admin who configures their system to send things to syslog instead
of journald can deal with one more thing that needs to be
changed.
Therefore, optimize for the majority and send logs to the default
journald. Additionally, don't send stdout to /dev/null because this
isn't the norm with systemd; stdout can provide valuable debugging
information; and journald provides facilities for filtering out stdout
in log output.
This isn't the normal way that systemd service files are written, and
lots of admins will probably be surprised to find that this is
happening. Therefore, remove it from the default configuration.
This is especially relevant given that the default ExecStart command
produces a help message, which causes systemd to mark the unit as
failed. This causes an infinite restart loop on default installs.