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.
container-overlay/profiles/templates/homeassistant/homeassistant/init.homeassistant

39 lines
1.0 KiB

# Calculate path=/etc/init.d name=#-cut(1,.)-# chmod=755 comment=# exists(/etc/homeassistant/configuration.yaml)!=
#!/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-live/bin/hass
directory=/var/calculate/www/homeassistant
start_stop_daemon_args="--user $user --stdout $stdoutlog --stderr $serverlog --wait 10"
command_args="
--config /etc/homeassistant
--log-file $warningslog
--log-rotate-days 9
${HASS_OPTS}
"
command_background=yes
pidfile=/run/homeassistant.pid
depend() {
need net nginx postgresql
}
start_pre() {
checkpath --file --owner $user --mode 0644 $stdoutlog
checkpath --file --owner $user --mode 0644 $serverlog
checkpath --file --owner $user --mode 0644 $warningslog
}