Re: [systemd-devel] assign variable to some service item

2016-10-05 Thread Colin Guthrie
As others have said, this is not possible. It is however possible to configure it via a dropin file. e.g. if your unit is called foo.service, then just mkdir /etc/systemd/system/foo.service.d/ and create a file cpu-affinity.conf inside that folder (any filename will do). In this file put:

Re: [systemd-devel] assign variable to some service item

2016-10-05 Thread Lennart Poettering
On Thu, 29.09.16 11:25, Vasiliy Tolstov (v.tols...@selfip.ru) wrote: > I have CPUAffinity inside service file and want to configure it via > EnvironmentFile, but > CPUAffinity=$CPUAffinity does not work with message Failed to parse > CPU affinity '$CPUAffinity' > Environment file contains

Re: [systemd-devel] assign variable to some service item

2016-09-29 Thread Brian Kroth
I asked about something similar to this a while back. I think the answer was that variable expansion only works in the Exec* directives. Cheers, Brian On Thu, Sep 29, 2016, 03:26 Vasiliy Tolstov wrote: > I have CPUAffinity inside service file and want to configure it via >

[systemd-devel] assign variable to some service item

2016-09-29 Thread Vasiliy Tolstov
I have CPUAffinity inside service file and want to configure it via EnvironmentFile, but CPUAffinity=$CPUAffinity does not work with message Failed to parse CPU affinity '$CPUAffinity' Environment file contains CPUAffinity="0-2" Does it possible to assign cpu affinity via env variable ? Thanks!