ESPHome: fix Dashboard's Online Check Issue
This commit is contained in:
31
dev-embedded/esphome/files/esphome.init.d-r2
Normal file
31
dev-embedded/esphome/files/esphome.init.d-r2
Normal 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"
|
||||
}
|
||||
Reference in New Issue
Block a user