On 2015-10-16 18:30, Andrei Borzenkov wrote:
16.10.2015 17:41, Chris Bell пишет:
WantedBy= # To clear out previous wantedby
though this doesn't seem to work like that. Documentation doesn't say
should, so I'm not surprised.
Only selected directives can be cleared this way.
Is there a way I can have it only enable the alias of the unit? Or do
both have to be enabled?
The problem is that Alias is just a symlink to "primary" unit file.
But in case of instantiated template no primary unit file exists at
all. So there would really be nothing to link to.
But it seems that even if I create link firstname.lastname@example.org to
foo@.service it still wants to enable template, not instantiated unit.
Also, is there any way to specify a unit alias within an
Seems to be ignored, at least [Install] section.
So, in short, systemd doesn't provide quite the functionality I am
looking for here. I am able to enable only the alias by using:
and not using 'WantedBy.' This achieves part of what I'd like to
accomplish. However, it doesn't end up being any more convenient from
most points of view. I was hoping that, if I aliased
'email@example.com' to 'gitlab.service' that I could then
# systemctl <command> gitlab.service
and have it know that I'm talking about gitlab.service. And I would
really like to be able to do this with overrides. Why? Because I'd like
to be able to have conveniently-named service identifiers that point to
pre-defined services/templates/etc. I would like to manage
'firstname.lastname@example.org' as 'gitlab.service' without having to
copy the systemd-nspawn template to a brand new gitlab.service. If I
create one-off copies, then if the template is updated those changes
don't propagate to the one-off copy. I guess I could accomplish this
with symlinks in the /etc/systemd dir (gitlab.service ->
email@example.com) but that's not a nice, clean, or good way
to do it. Are there any other solutions/workarounds? Or is systemd just
not intended to be used like this?
systemd-devel mailing list