Change mtail service to read /dev/stdin instead of "-"

The shell alias "-" should work for stdin, but on one of my servers it
was not working and stracing the process showed it kept trying to open a
file named /-. I do not know how or why this was the case, but altering
it to read /dev/stdin instead solved the issue.
This commit is contained in:
Mark Felder
2026-01-19 11:33:09 -08:00
parent 08bf4c234b
commit 36f437b9ca

View File

@@ -3,7 +3,7 @@ Description=mtail
[Service] [Service]
Type=simple Type=simple
ExecStart=/bin/sh -c "journalctl -f -o short-iso -n 0 | /usr/local/bin/mtail --address={{ address }} --port={{ port }} --progs /etc/mtail --logtostderr --logs -" ExecStart=/bin/sh -c "journalctl -f -o short-iso -n 0 | /usr/local/bin/mtail --address={{ address }} --port={{ port }} --progs /etc/mtail --logtostderr --logs /dev/stdin"
Restart=on-failure Restart=on-failure
[Install] [Install]