ESPHome: fix Dashboard's Online Check Issue

This commit is contained in:
2019-12-28 16:56:17 +01:00
parent 86849b1ff3
commit dce7aa7dee
5 changed files with 134 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="ESPHome dashboard"
command_user="esphome:esphome"
command="/usr/bin/esphome"
command_args="
/etc/esphome
dashboard
${ESPHOME_OPTS}
"
output_log="/var/log/esphome/stdout.log"
error_log="/var/log/esphome/dashboard.log"
command_background=yes
pidfile=/run/esphome.pid
depend() {
need net
after bootmisc
}
start_pre() {
checkpath --file --owner $command_user --mode 0644 $output_log
checkpath --file --owner $command_user --mode 0644 $error_log
export ESPHOME_DASHBOARD_USE_PING="true"
}