Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Run as service for autorun at startup

DewGew edited this page Apr 30, 2020 · 5 revisions

If installation made manually.
Open terminal or putty.

cd /etc/systemd/system/
sudo nano dzga.service

Add this in nano (change 'pi' to match your user):

[Unit]
Description=Domoticz-Google-Assistant Service
After=multi-user.target
Conflicts=getty@tty1.service

[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/pi/Domoticz-Google-Assistant/
StandardInput=tty-force
User=pi
Restart=on-failure

[Install]
WantedBy=multi-user.target

Then ctrl-x save and close. Enable service:

sudo systemctl enable dzga.service
sudo systemctl start dzga.service

Uninstall Service:

sudo systemctl stop dzga.service
sudo systemctl disable dzga.service
sudo rm /etc/systemd/system/dzga.service