An administrator needs to configure a critical web service on a Linux server to automatically restart if it crashes unexpectedly. The server uses systemd. Which of the following best accomplishes this goal?
Restart=always tells systemd to restart the service whenever it stops, which is the proper and most reliable way to ensure automatic recovery.
Why this answer
Option C is correct because setting Restart=always in the systemd unit file ensures the service restarts regardless of exit code, which is the proper systemd method. Option A is wrong because a cron job introduces a potential delay and is less reliable than built-in service supervision. Option B is wrong because an init.d script with a loop is an outdated approach and not recommended with systemd.
Option D is wrong because inetd starts services on demand, not for persistent daemons.