Make websockets and Web Serial work, set PATH variable in service file

This commit is contained in:
yuri 2022-12-18 02:37:15 +01:00
parent 51fd3367db
commit 926f9aa3a5
No known key found for this signature in database
GPG key ID: E646779AC54AEC64
3 changed files with 5 additions and 1 deletions

View file

@ -2,9 +2,10 @@
Description=ESPHome
[Service]
ExecStart=/home/esphome/.local/bin/esphome dashboard config/
ExecStart=/home/esphome/.local/bin/esphome dashboard /home/esphome/.local/bin/config/
WorkingDirectory=/home/esphome/.local/bin
User=esphome
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/esphome/.local/bin
[Install]
WantedBy=multi-user.target

View file

@ -1,4 +1,6 @@
---
- name: Restart esphome
ansible.builtin.systemd:
service: esphome.service
state: restarted
daemon_reload: true

View file

@ -7,6 +7,7 @@
- name: Ensure esphome user exists
ansible.builtin.user:
name: esphome
shell: /bin/bash
- name: Ensure esphome dependencies are installed
become_user: esphome
ansible.builtin.pip: