5

I want to disable a systemd service auto-restart after it crashes. I did some search and I found that "Restart" property of .service files has some options, but none of them does not mean "disable". Could anyone help please?

1 Answer 1

6

If you don't want the service to start after crash, delete the Restart option of the service file. Then run:

systemctl daemon-reload

An enabled service is a service that starts at boot. To disable start at boot run:

sudo systemctl disable <service_name>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.