Debugging a systemd service failing to run to completion is fiddly and has a slow feedback cycle when using standard commands. That is, running commands_to_install_service && systemctl start --wait service-name in one window, and looking for the relevant logs in another terminal showing journalctl --follow --unit=service-name. A quick look through man 1 systemctl didn't show any obvious way to print a copy of the logs to the terminal which is starting the service.
Add a comment |
1 Answer
While I see the utility of such a command, I don't think that exists.
But maybe
(sleep 1; systemctl start foobar)& journalctl --follow --end --unit foobar.service is enough to scratch that itch?