|
|
|
|
|
by xerxes901
131 days ago
|
|
> As a trivial example, you can dynamically depend on other services depending on system configuration (as PostgreSQL does) Depending on what you want to do, a generator might be appropriate: > Their main purpose is to convert configuration and execution context parameters that are not native to the service manager into dynamically generated unit files, symlinks or unit file drop-ins |
|
What would this look like with a systemd service file generator?
[0] What's a "meta-service"? 'provide postgresql' makes the service started by this service file provide the 'postgresql' "meta-service". This is useful for PostgreSQL because you can install multiple versions of the software simultaneously... so the service files are named like postgresql-17, and postgresql-18. The 'logger' "meta-service" is useful because who cares which syslog software you have installed... you only care that it speaks syslog.