systemd service definitions may suck

Today I've added a systemd service definition, but it didn't show up as a service when running systemctl list-units. I took me a while to figure out how to ask systemd if there's anything wrong with my .service file. The easiest way to get infos about broken service files I could find is to run:

systemd-analyze verify my.service

If that doesn't work, make sure the file is in the correct path. (/etc/systemd/system/*.service) Once all typos/bugs/etc. are fixed don't forget to run systemctl daemon-reload to make sure systemd is aware of the new unit.

written by uniq on 2020-07-21