<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 16, 2017 at 1:09 PM, Reindl Harald <span dir="ltr"><<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Am 16.08.2017 um 12:04 schrieb Mantas Mikulėnas:<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Aug 16, 2017 at 12:09 PM, Reindl Harald <<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.net</a> <mailto:<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.net</a><wbr>>> wrote:<br>
<br>
<br>
Am 16.08.2017 um 10:31 schrieb Mantas Mikulėnas:<br>
<br>
Just put everything in a shell script. (That way you can test it<br>
directly without systemd, too.)<br>
<br>
With bash, you can use inline comments in arrays:<br>
<br>
#!/usr/bin/env bash<br>
args=(<br>
-X POST # foo<br>
-d "fizz=systemd" # some docs<br>
-d "some=else" # more docs<br>
<a href="https://requestb.in/foo" rel="noreferrer" target="_blank">https://requestb.in/foo</a><br>
)<br>
<br>
exec curl "${args[@]}"<br>
<br>
<br>
this is the worst recommendation one can give - really - that way<br>
you easily lose all the advantages of systemd in case of error handling<br>
<br>
<br>
For example?<br>
</blockquote>
<br></span>
what is the MAINPID - bash or curl - in that case?<br></blockquote><div><br></div><div>curl, since `exec` preserves the PID.</div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>