From b9e7f41b76ef08b20ff288167b2891743b725fe5 Mon Sep 17 00:00:00 2001 From: akloeckner Date: Sun, 17 Feb 2019 11:29:22 +0100 Subject: [PATCH] Add hint on how to restart on crash (#8610) I was experiencing crashes, when I requested too many data points for plotting. So, this configuration makes my system come back automatically. --- source/_docs/autostart/systemd.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/_docs/autostart/systemd.markdown b/source/_docs/autostart/systemd.markdown index 450ee5a8a20..30faef2d122 100644 --- a/source/_docs/autostart/systemd.markdown +++ b/source/_docs/autostart/systemd.markdown @@ -134,3 +134,11 @@ When working on Home Assistant, you can easily restart the system and then watch $ sudo systemctl restart home-assistant@YOUR_USER && sudo journalctl -f -u home-assistant@YOUR_USER ``` +### {% linkable_title Automatically restarting Home Assistant on failure %} + +If you want to restart the Home Assistant service automatically after a crash, add the following lines to the `[Service]` section of your unit file: + +``` +Restart=on-failure +RestartSec=5s +```