0

Given I cannot test it by restarting the production server, if the service is set to Restart=on-abort, will it start automatically after I restarted the server?

James Lin
  • 135

2 Answers2

2

The Restart setting is not related to the initial starting of the service at all. The service is started if it is enabled (see systemctl status servicename) or if it is required by another service which is started.

Hauke Laging
  • 90,279
0

The service is started, automatically if the service is placed in the appropriate 'target' and enabled. Example, to find the default target level,

systemctl get-default

and that the service is enabled, and it's pre-requisites are met.

restart="on-abort" seems to be of specific interest in case of failures.

A service may fail for various reasons. restart="on-abort" will restart the service only if the service aborted.