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?
Asked
Active
Viewed 212 times
0

James Lin
- 135
-
https://unix.stackexchange.com/questions/564443/what-does-restart-on-abort-mean-in-a-systemd-service can probably help you. – ksrikanth Jul 09 '20 at 02:37
-
yes I have been there before. – James Lin Jul 09 '20 at 03:30
2 Answers
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.