I have a service that I'm developing which I want to distribute a systemd unit service file with.
There are 2 unit service files. One for the "scheduler" another for the "worker". The scheduler needs to parameters for host and port. The worker also needs host and port which points to the scheduler.
What is the right way to package systemd unit files that requires these user-level configuration because the package author doesn't know what host/port will be used by the end user? Systemd unit files seems to be limited parameterization capabilities. There's only the
%I wild cards and environment variables that are not propagated from
systemctl command or environment variables config file location which must be hardcoded.
According to the Debian wiki https://wiki.debian.org/Teams/pkg-systemd/Packaging#systemd_unit_files_naming_and_installation, it is expected that the end user would override the
ExecStart setting appropriately. That maybe so, but then shouldn't the packaged systemd unit files have some defaults so it can be used immediately?
Is it ok to simply hardcode
127.0.0.1 with some random port
8000 for the distributed systemd file then?