mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-09 09:21:03 +01:00
Simplify run_on_startup handling for consistency
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
@@ -33,14 +33,12 @@ chmod -R 777 "$HOME"
|
||||
######################
|
||||
|
||||
# Handle run_on_startup option
|
||||
if bashio::config.has_value "run_on_startup"; then
|
||||
if bashio::config.true "run_on_startup"; then
|
||||
bashio::log.info "run_on_startup is enabled"
|
||||
jq '.runOnStartup = true' "$CONFIG_JSON" > "${CONFIG_JSON}.tmp" && mv "${CONFIG_JSON}.tmp" "$CONFIG_JSON"
|
||||
else
|
||||
bashio::log.info "run_on_startup is disabled"
|
||||
jq '.runOnStartup = false' "$CONFIG_JSON" > "${CONFIG_JSON}.tmp" && mv "${CONFIG_JSON}.tmp" "$CONFIG_JSON"
|
||||
fi
|
||||
if bashio::config.true "run_on_startup"; then
|
||||
bashio::log.info "run_on_startup is enabled"
|
||||
jq '.runOnStartup = true' "$CONFIG_JSON" > "${CONFIG_JSON}.tmp" && mv "${CONFIG_JSON}.tmp" "$CONFIG_JSON"
|
||||
else
|
||||
bashio::log.info "run_on_startup is disabled"
|
||||
jq '.runOnStartup = false' "$CONFIG_JSON" > "${CONFIG_JSON}.tmp" && mv "${CONFIG_JSON}.tmp" "$CONFIG_JSON"
|
||||
fi
|
||||
|
||||
# Handle disable_cron option
|
||||
|
||||
Reference in New Issue
Block a user