3

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?

weera
  • 884
  • 1
  • 10
  • 21

1 Answers1

2

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>
fa__
  • 267
  • 5
  • 17