You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
# Calculate path=/etc/init.d name=#-cut(1,.)-# chmod=755 comment=# exists(/var/calculate/www/homeassistant/.homeassistant)!=
|
|
#!/sbin/openrc-run
|
|
# Copyright 2022 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
description="Open-source home automation platform"
|
|
|
|
user="homeassistant:homeassistant"
|
|
|
|
stdoutlog="/var/log/homeassistant/stdout.log"
|
|
serverlog="/var/log/homeassistant/server.log"
|
|
warningslog="/var/log/homeassistant/warnings.log"
|
|
retry="20"
|
|
|
|
command=/var/calculate/www/homeassistant/.venv/bin/hass
|
|
directory=/var/calculate/www/homeassistant
|
|
|
|
start_stop_daemon_args="--user $user --stdout $stdoutlog --stderr $serverlog --wait 10"
|
|
|
|
command_args="
|
|
--log-file $warningslog
|
|
--log-rotate-days 9
|
|
${HASS_OPTS}
|
|
"
|
|
|
|
command_background=yes
|
|
pidfile=/run/homeassistant.pid
|
|
|
|
depend() {
|
|
need net nginx
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath --file --owner $user --mode 0644 $stdoutlog
|
|
checkpath --file --owner $user --mode 0644 $serverlog
|
|
checkpath --file --owner $user --mode 0644 $warningslog
|
|
}
|