Make websockets and Web Serial work, set PATH variable in service file
This commit is contained in:
parent
51fd3367db
commit
926f9aa3a5
|
@ -2,9 +2,10 @@
|
||||||
Description=ESPHome
|
Description=ESPHome
|
||||||
|
|
||||||
[Service]
|
[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
|
WorkingDirectory=/home/esphome/.local/bin
|
||||||
User=esphome
|
User=esphome
|
||||||
|
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/esphome/.local/bin
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
---
|
||||||
- name: Restart esphome
|
- name: Restart esphome
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
service: esphome.service
|
service: esphome.service
|
||||||
state: restarted
|
state: restarted
|
||||||
|
daemon_reload: true
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
- name: Ensure esphome user exists
|
- name: Ensure esphome user exists
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: esphome
|
name: esphome
|
||||||
|
shell: /bin/bash
|
||||||
- name: Ensure esphome dependencies are installed
|
- name: Ensure esphome dependencies are installed
|
||||||
become_user: esphome
|
become_user: esphome
|
||||||
ansible.builtin.pip:
|
ansible.builtin.pip:
|
||||||
|
|
Loading…
Reference in a new issue