When I keep my Myservice.service
file in /etc/systemd/system/Myservice.service
. I get not-found
error.
systemctl status Myservice
● Myservice.service
Loaded: not-found (Reason: Unit Myservice.service not found.)
Active: failed (Result: exit-code) since Thu 2020-08-27 11:04:58 EDT; 22min ago
Main PID: 3539430 (code=exited, status=125)
But when I keep the same service file in /lib/systemd/system/Myservice.service
. It works fine.
But why doesn't it work in the first scenario? why systemd not able to find file in first case. How can I debug this scenario with systemd.