Hans Gruber
2021-04-22 18:18:01 UTC
Hello,
I am having problems with the aliases and "Alias=' directive related to the template service unit.
According to https://www.freedesktop.org/software/systemd/man/systemd.unit.html
I have exactly these two cases and requirements and cannot find example.
I can't apply any alias using "Alias=" directive for two different template .service unit.Whatever I use for "Alias=" directive in the two cases inside the templates, instance service works, all symlink are created when instance is enabled, instance services are started as expected using their names, but all alias are always reporting
"Loaded: error (Reason: unit alasname failed to load properly: File exists)"
Alias=***@.service
Alias=allcores@%i.serviceAlias=alias@*.service
Alias=tty12-tailoutput@%i.service
Alias=%i-***@.service
Alias=***@tty12.serviceAlias=alias-%n
Thank you in advance.
Regards
I am having problems with the aliases and "Alias=' directive related to the template service unit.
According to https://www.freedesktop.org/software/systemd/man/systemd.unit.html
I have exactly these two cases and requirements and cannot find example.
 "A template may be aliased by another template (in which case the alias applies to all instances of the template)"
eg: How to create an alias using `Alias=` for a service template ***@.service which will have maybe 2 instances (eg: ***@tty11.service ***@tty12.service ..) which will apply to only instance ***@tty12.service when enabled using eg: tty12-***@tty12.service.I can't apply any alias using "Alias=" directive for two different template .service unit.Whatever I use for "Alias=" directive in the two cases inside the templates, instance service works, all symlink are created when instance is enabled, instance services are started as expected using their names, but all alias are always reporting
"Loaded: error (Reason: unit alasname failed to load properly: File exists)"
Alias=***@.service
Alias=allcores@%i.serviceAlias=alias@*.service
Alias=tty12-tailoutput@%i.service
Alias=%i-***@.service
Alias=***@tty12.serviceAlias=alias-%n
Thank you in advance.
Regards