В Sun, 17 Aug 2014 16:37:58 +0200 Per Jessen <per@computer.org> пишет:
Per Jessen wrote:
Per Jessen wrote:
Andrei Borzenkov wrote:
One possibility is to use templates.
postfix@.service as template and then simply
ln -s postfix@.service postfix@<whatever>.service
Inside unit definition you refer to part after @ as %i or %I (should be the same in your case). See man systemd.unit. So start command will become
postfix -c %I start
Thanks Andrei and Cristian - much appreciated!
And it worked really well, brilliant!
For now I've got three such instances set up - postfix, postfix-in and postfix-out. Problem - although a service instance appears to be enabled, it isn't started at boot-up?
# systemctl status postfix@postfix postfix@postfix.service - Postfix Mail Transport Agent (postfix) Loaded: loaded (/etc/systemd/system/postfix@.service; enabled) Active: inactive (dead)
# systemctl status postfix@postfix-in postfix@postfix-in.service - Postfix Mail Transport Agent (postfix-in) Loaded: loaded (/etc/systemd/system/postfix@.service; enabled) Active: inactive (dead)
# systemctl status postfix@postfix-out postfix@postfix-out.service - Postfix Mail Transport Agent (postfix-out) Loaded: loaded (/etc/systemd/system/postfix@.service; enabled) Active: inactive (dead)
# systemctl is-enabled postfix@postfix.service enabled
I suspect systemctl "status" and "is-enabled" reporting "enabled" is incorrect:
# find /etc/systemd/system -name \*postfix\* /etc/systemd/system/postfix@.service /etc/systemd/system/postfix@postfix-in.service /etc/systemd/system/postfix@postfix-out.service /etc/systemd/system/postfix@postfix.service
Trying to enable an instance:
# systemctl enable postfix@postfix.service Failed to issue method call: No such file or directory
I must be doing something wrong, but I simply can't spot it. Starting an instance manually works.
Please show full unit definition. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org