#!/sbin/openrc-run

name="Home Assistant"
command="/usr/bin/hass"
command_args="--config $HASS_CONF --pid-file $HASS_PID --daemon"
start_stop_daemon_args="--user $HASS_USER --group $HASS_GROUP"
pidfile="$HASS_PID"
retry="TERM/30/KILL/5"

depend() {
        need net localmount
        after firewall
}

start_pre() {
	checkpath --directory --owner $HASS_USER:$HASS_GROUP --mode 0775 \
		/run/hass
}
