[systemd-devel] Formatting Execstart= for readability
Mantas Mikulėnas
grawity at gmail.com
Wed Aug 16 10:41:41 UTC 2017
On Wed, Aug 16, 2017 at 1:09 PM, Reindl Harald <h.reindl at thelounge.net>
wrote:
>
>
> Am 16.08.2017 um 12:04 schrieb Mantas Mikulėnas:
>
>> On Wed, Aug 16, 2017 at 12:09 PM, Reindl Harald <h.reindl at thelounge.net
>> <mailto:h.reindl at thelounge.net>> wrote:
>>
>>
>> Am 16.08.2017 um 10:31 schrieb Mantas Mikulėnas:
>>
>> Just put everything in a shell script. (That way you can test it
>> directly without systemd, too.)
>>
>> With bash, you can use inline comments in arrays:
>>
>> #!/usr/bin/env bash
>> args=(
>> -X POST # foo
>> -d "fizz=systemd" # some docs
>> -d "some=else" # more docs
>> https://requestb.in/foo
>> )
>>
>> exec curl "${args[@]}"
>>
>>
>> this is the worst recommendation one can give - really - that way
>> you easily lose all the advantages of systemd in case of error
>> handling
>>
>>
>> For example?
>>
>
> what is the MAINPID - bash or curl - in that case?
>
curl, since `exec` preserves the PID.
--
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170816/e5c15b5a/attachment.html>
More information about the systemd-devel
mailing list