<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 16/08/2017 10:31, Mantas Mikulėnas
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPWNY8WOzaW0O0wAu8xqD25TWw=rthgKbis_b7gkXf5D7P18Pg@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Aug 16, 2017 at 10:52 AM, Kai
Hendry <span dir="ltr"><<a
href="mailto:hendry@webconverger.com" target="_blank"
moz-do-not-send="true">hendry@webconverger.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi there,<br>
<br>
I maintain a service file with a lot of switches in the
ExecStart<br>
<a
href="https://github.com/kaihendry/pingprom/blob/master/prometheus%40.service#L8"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/kaihendry/<wbr>pingprom/blob/master/<wbr>prometheus%40.service#L8</a><br>
<br>
I want to almost document each switch ... e.g.<br>
-storage.local.retention=8544h # keep data for a year<br>
<br>
I know inline comments do *not* work in bash IIUC:<br>
<a
href="https://gist.github.com/kaihendry/ff751622c6454176837b1c340b5cfccb"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://gist.github.com/<wbr>kaihendry/<wbr>ff751622c6454176837b1c340b5cfc<wbr>cb</a><br>
<br>
And similarly when I try break up lines on something like<br>
<a href="https://s.natalian.org/2017-08-16/test.service"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://s.natalian.org/2017-<wbr>08-16/test.service</a><br>
<br>
[Service]<br>
ExecStart=/usr/bin/curl -X POST<br>
-d "fizz=systemd" # some docs<br>
-d "some=else" # more docs<br>
<a href="https://requestb.in/19v8a0m1" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://requestb.in/19v8a0m1</a><br>
<br>
<br>
It also doesn't work. Am I missing a tool or way to better<br>
format/document process arguments like I want?<br>
</blockquote>
<div><br>
</div>
<div>Just put everything in a shell script. (That way you
can test it directly without systemd, too.)</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
Alternatively, you could documente everything in an EnvironmentFile
that sets an environment variable with all the parameters and
documents in a comment<br>
<br>
Regards<br>
Jérémy<br>
<div class="moz-signature">-- </div>
<blockquote type="cite"
cite="mid:CAPWNY8WOzaW0O0wAu8xqD25TWw=rthgKbis_b7gkXf5D7P18Pg@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>With bash, you can use inline comments in arrays: </div>
<div><br>
</div>
</div>
</div>
<blockquote style="margin:0px 0px 0px
40px;border:none;padding:0px">
<div class="gmail_extra">
<div class="gmail_quote">
<div>
<div><font face="monospace, monospace">#!/usr/bin/env
bash</font></div>
</div>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<div><font face="monospace, monospace">args=(</font></div>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<div><font face="monospace, monospace"> -X POST
# foo</font></div>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<div><font face="monospace, monospace"> -d
"fizz=systemd" # some docs</font></div>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<div><font face="monospace, monospace"> -d "some=else"
# more docs</font></div>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<div><font face="monospace, monospace"> <a
href="https://requestb.in/foo"
moz-do-not-send="true">https://requestb.in/foo</a></font></div>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">
<div><font face="monospace, monospace">)</font></div>
</div>
</div>
</blockquote>
<blockquote style="margin:0px 0px 0px
40px;border:none;padding:0px">
<div class="gmail_extra">
<div class="gmail_quote">
<div><font face="monospace, monospace">exec curl
"${args[@]}"</font></div>
</div>
</div>
</blockquote>
<div class="gmail_extra">
<div class="gmail_quote">
<div><font face="monospace, monospace"><br>
</font></div>
</div>
</div>
<div class="gmail_extra">-- <br>
<div class="gmail_signature">
<div dir="ltr">Mantas Mikulėnas <<a
href="mailto:grawity@gmail.com" target="_blank"
moz-do-not-send="true">grawity@gmail.com</a>></div>
<div dir="ltr"><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
systemd-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div style="border-bottom: 1px solid #ccd4d7; margin:0 10px 10px
0; width:600px"> </div>
<div>
<table style="; padding: 15px 0 0 0" border="0">
<tbody>
<tr>
<td style="font-size:11px; color:#56707d; text-align:
center; "> <a href="http://www.smile.fr/"><img
src="http://ftp.smile.fr/client/Communication/signature/img/Logo.png"
alt="Logo" height="47" width="129"></a><br>
<br>
<font face="century gothic, arial, sans-serif">20 rue
des Jardins<br>
92600 Asnières-sur-Seine<br>
<a href="http://www.smile.fr/" style="font-size:14px;
color:#ec6608 ; text-decoration:none;">www.smile.fr</a></font>
</td>
<td style="padding-left:35px; font-size:12px;
color:#56707d">
<div style="color:#153358; font-size:12px;"><font
face="century gothic, arial, sans-serif"><b>Jérémy
ROSEN</b></font></div>
<div style="color:#117eb4; font-size:12px;"><font
face="century gothic, arial, sans-serif">Architecte
technique<br>
</font></div>
<div style="color:#56707d; font-size:12px;"><font
face="century gothic, arial, sans-serif">Email : <a
href="mailto:jeremy.rosen@smile.fr"
style="color:#56707d; font-size:12px;
text-decoration:none;">jeremy.rosen@smile.fr</a> <br>
Tel : +33141402967 </font></div>
<br>
<div> <span><a
href="https://www.facebook.com/smileopensource"><img
src="http://ftp.smile.fr/client/Communication/signature/img/Facebook.png"
alt="Facebook" height="24" width="25"></a></span>
<span><a
href="http://fr.slideshare.net/SmileOpenSource/presentations"><img
src="http://ftp.smile.fr/client/Communication/signature/img/Slideshare.png"
alt="Google%2B" height="24" width="25"></a></span>
<span><a href="https://www.linkedin.com/company/smile"><img
src="http://ftp.smile.fr/client/Communication/signature/img/LinkedIn.png"
alt="LinkedIn" height="24" width="25"></a></span>
<span><a href="https://twitter.com/GroupeSmile"><img
src="http://ftp.smile.fr/client/Communication/signature/img/Twitter.png"
alt="Twitter" height="24" width="25"></a></span>
</div>
</td>
</tr>
</tbody>
</table>
<div style="border-bottom: 1px solid #ccd4d7; margin:0 10px 0 0;
width:600px"> </div>
<br>
<div> <a
href="http://www.smile.fr/Offres-services/Offres/Ingenierie?utm_source=signature&utm_medium=email&utm_campaign=signature"><img
src="http://signature.smile.eu/assets/img/OW_devient_Smile_ECS.png"
alt="bandeaux_mail" border="0"></a></div>
<br>
<div style="color:#a3acb5; font-size:10px;"> <img
src="http://ftp.smile.fr/client/Communication/signature/img/eco.png"
alt="eco" height="11" width="13"> <font face="century
gothic, arial, sans-serif"> Pour la planète, n'imprimez ce
mail que si c'est nécessaire </font> </div>
</div>
</div>
</body>
</html>