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.
37 lines
968 B
37 lines
968 B
1 year ago
|
# Calculate path=/etc/init.d name=#-cut(1,.)-# chmod=755 comment=# exists(/var/calculate/www/homeassistant/.venv)!=
|
||
|
#!/sbin/openrc-run
|
||
|
|
||
|
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 postgresql
|
||
|
# 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
|
||
|
}
|