<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 15, 2018 at 3:39 PM, Boyce, Kevin P [US] (AS) <span dir="ltr"><<a href="mailto:Kevin.Boyce@ngc.com" target="_blank">Kevin.Boyce@ngc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> you can't Require mysql because it's wrong when postgresql is used you can't Require postgresql because it's wrong when mysql is used<br>
<br>
Why wouldn't the mysql/postgres/mariadb packager have a section as follows:<br>
[Install]<br>
Alias=database.service<br>
<br>
Then you could have other services reference the dependency on database.service. I think this would work much like the display-manager.service. Not everyone uses gdm, some use lightdm, kdm, etc. I expect it work work the same way.<br></blockquote><div><br></div><div>No, they're different.</div><div><br></div><div>Display managers are exclusive – there's usually only one per system. But the same system could easily run several different databases at once – MySQL, Postgres, Firebird do not conflict with each other. So an alias would prohibit that.</div><div><br></div><div>If a program has selectable database backends, I would say it's up to the sysadmin to define dependencies as well. `systemctl add-requires my-app.service mysql.service` would do the job. Or the app could ship a "generator" (similar to the existing fstab-generator, nfs-generator, openvpn-generator...) which adds those dependencies dynamically.</div><div> </div></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div>
</div></div>