# Calculate path=/etc/init.d name=#-cut(1,.)-# chmod=755 comment=# exists(/etc/homeassistant/configuration.yaml)!= #!/sbin/openrc-run # Copyright 2023 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/${RC_SVCNAME}/${RC_SVCNAME}-live/bin/hass directory=/var/calculate/www/${RC_SVCNAME}/${RC_SVCNAME}-live start_stop_daemon_args="--user $user --stdout $stdoutlog --stderr $serverlog --wait 10" command_args=" --config /var/calculate/${RC_SVCNAME} --log-file $warningslog --log-rotate-days 9 ${HASS_OPTS} " command_background=yes pidfile=/run/${RC_SVCNAME}.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 }