Am 01.09.22 um 11:04 schrieb Harald Bergmann:
Hello Michael,

many thanks for your quick test!
Please try to combine the two ExecStartPre to a single one by ;.
Your way of multiple command lines is likely another way of workaround.

It's not a workaround, it's the only valid syntax.
As mentioned in the other reply, there can only be a single command per Exec* line. You can have multiple ExecStartPre lines or a single ExecStartPre line using sh -c " ". Within that shell you can run multiple commands as you wish, basically do anything.

I personally prefer the multiple ExecStartPre lines though, as it makes it easier to debug on failures. You'll see exactly which line failed (and its error code)

And if you have a ExecStart=sh -c " " command which is complex and spans multiple lines, my recommendation is to move that into a separate, external shell script that can be called directly fro ExecStart=

Michael




Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to