Re: Systemd unit file implementation questions (ypbind)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have similar question (sorry for stealing this thread). I have package 
that has 3 services (they somehow depend on each other). Based on 
configuration in /etc/sysconfig/.. file it starts 2 or 3 services. This is
handled by init script, but I don't know how to do it in systemd service
file.
AFAIK:
a)
EnvironmentFile=...
ExecStart=[ -n "$DRIVER" ] && /start/driver/...
ExecStart=[ -n "$BACKEND" ] && /start/backend/...
ExecStart=[ -n "$MONITOR" ] && /start/monitor/...

won't work, because ExecStart must be path, not shell command

b)
ExecStart=/usr/libexec/%{name}/startifset "$DRIVER" /start/driver
ExecStart=/usr/libexec/%{name}/startifset "$BACKEND" /start/backend
ExecStart=/usr/libexec/%{name}/startifset "$MONITOR" /start/monitor

won't work, because there ExecStart can't be used more than once, 
except with type=oneshot, which does not work here

c)
ExecStart=/usr/libexec/nut/startthemall

this is only workable solution I know (for now), but I don't know if it's the best one

d) split it to more service files and make dependency there

this would be incompatible change in configuration and hard to do, because 
dependency can change with configuration


Is there a good solution for this?

Michal



-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux