Stop HASS Script Fail - Manual Install

Hi,
I am trying to get write a script that stops & restarts HASS, I have reviewed the docs and followed this thread, but I keep getting “service failed to load”. I have a manual install with my HA path being /home/pi/.homeassistant and pi is the owner. I have tried sudo systemctl start home-assistant@pi but when I run systemctl list-units --all I see that that service failed and didn’t load and isn’t active? What am I missing?

Have a look at the systemd folder.
ls -l /etc/systemd/system/

Thanks! When I go there I see, -rw-r--r-- 1 root root 163 Jul 1 20:50 [email protected]. I changed it to sudo chmod 777 but I still get a failure to load when I check the systemd units

What is the content of the systemd file?

cat /etc/systemd/system/[email protected]

This is what it returns:

[Unit]
Description=Home Assistant
After=network.target

[Service]
Type=simple
User=raspberrypi
ExecStart=/usr/local/bin/hass

[Install]
WantedBy=multi-user.target

One problem is the user. You are trying to start it with the pi user as in [email protected] but the user in the script is raspberrypi If you replace the User= line with
User=%i
the startup script will pick up the user from the home-assistant@pi.service

After changes to the file you will need to have systemd re read them.
sudo systemctl --system daemon-reload
You may want to redo the enable at boot.
sudo systemctl enable home-assistant@pi

That did it! Thank you!

Great news!