[systemd-devel] macros in systemd unit files question

Tom Gundersen teg at jklm.no
Wed Jul 31 06:13:56 PDT 2013


On Wed, Jul 31, 2013 at 3:05 PM, lux-integ <lux-integ at btconnect.com> wrote:
> On Wednesday 31 July 2013 13:26:18 Tom Gundersen wrote:
>>  If you really need a proper programming
>> language, then you'd be better off using a script and pointing
>> ExecStart to that.
>
> example please?

Make a bash script (or whatever else) doing what you want (the
pseudo-code you posted). Save it as /usr/local/bin/foo and create a
unit file with ExecStart=/usr/local/bin/foo.

That said, there probably is a better way to solve your problem not
involving macros or scripts (at least in my experience it always is).
But that would obviously depend on exactly what you are trying to do.

-t


More information about the systemd-devel mailing list