But when I try to restart HA with the restart button on the user interface, the process stops and is not restarted.
Is there a way to solve this problem? Or maybe I haven’t launched it in the right way?
Ok first thing is i’ve created a service to manage my HA instance.
It’ll restart the instance after an UI restart !
[Unit]
Description=Home Assistant Service
After=network-online.target
[Service]
Type=simple
User=homeassistant
Group=homeassistant
UMask=007
WorkingDirectory=/srv/homeassistant
Environment="VIRTUAL_ENV=/srv/homeassistant"
Environment="PATH=$VIRTUAL_ENV/bin:$PATH"
ExecStart=/srv/homeassistant/bin/hass
Restart=always
RestartSec=3
# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target