<div dir="auto">Maybe then use double-quotes around the command, and escape the inner ones for grep args. Or make a wrapper script in a separate file with equivalent content, and call it as ExecStart.<div dir="auto"><br></div><div dir="auto">Jim</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Nov 30, 2025, 14:08 Roger Price <<a href="mailto:roger@rogerprice.org">roger@rogerprice.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, 29 Nov 2025, Jim Klimov wrote:<br>
<br>
> Well, as a sort of hot-fix, you could edit `/usr/lib/systemd/system/nut-monitor.service` to replace ExecStart<br>
> from a direct command call to a shell snippet, something like:<br>
> <br>
> -ExecStart=/usr/local/ups/sbin/upsmon -F<br>
> +ExecStart=/bin/sh -c '/usr/local/ups/sbin/upsmon -F | grep -v "Network UPS Tools upsmon 2.8.1"'<br>
> <br>
> NOTE: If here you would be editing the file directly, it would be likely overwritten by eventual package upgrade -<br>
> but then it would hopefully be with a more recent NUT.<br>
<br>
This is a neat idea. I made the change to ExecStart and ran <br>
systemctl daemon-reload. I then ran systemctl status nut-monitor and got the <br>
following error message:<br>
<br>
Nov 30 12:54:27 titan systemd[1]: /usr/lib/systemd/system/nut-monitor.service:38:<br>
Ignoring unknown escape sequences: "/usr/sbin/upsmon -F | grep -vE "Network UPS Tools .* 2\.8\.[012]""<br>
<br>
It looks as if systemd is making a mess of the single and double quotes.<br>
<br>
I've been reading <br>
<a href="https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Command%20lines" rel="noreferrer noreferrer" target="_blank">https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Command%20lines</a> <br>
but I'm not any clearer about single/double quoting.<br>
<br>
Roger</blockquote></div>