Skip to content

Commit

Permalink
add -R restart delay
Browse files Browse the repository at this point in the history
Workaround an issue where Home Assistant fails to restart using the GUI
  • Loading branch information
tprelog committed Feb 3, 2022
1 parent 3fdf44e commit 10910f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion overlay/usr/local/etc/rc.d/homeassistant
Expand Up @@ -51,6 +51,7 @@ rcvar=${name}_enable
: "${homeassistant_skip_pip:="NO"}"
: "${homeassistant_verbose:="NO"}"
: "${homeassistant_color_log:="YES"}"
: "${homeassistant_restart_delay:=1}"

if [ ! "$(id ${homeassistant_user} 2>/dev/null)" ]; then
err 1 "user not found: ${homeassistant_user}"
Expand Down Expand Up @@ -130,7 +131,7 @@ homeassistant_prestart() {
checkyesno homeassistant_skip_pip && HA_ARGS="${HA_ARGS} --skip_pip"
checkyesno homeassistant_verbose && HA_ARGS="${HA_ARGS} --verbose"

rc_flags="-f -o ${logfile} -P ${pidfile} -p ${pidfile_child} ${HA_CMD} ${HA_ARGS}"
rc_flags="-f -o ${logfile} -P ${pidfile} -p ${pidfile_child} -R ${homeassistant_restart_delay} ${HA_CMD} ${HA_ARGS}"
}

start_postcmd=${name}_poststart
Expand Down

0 comments on commit 10910f3

Please sign in to comment.