diff --git a/pilight/run.sh b/pilight/run.sh index ccf4c4d..bd796dc 100644 --- a/pilight/run.sh +++ b/pilight/run.sh @@ -5,7 +5,6 @@ bashio::log.debug "Starting Setup of Pilight Server by reading values from Confi if bashio::config.has_value "gpio_platform"; then GPIO_PLATFORM=$(bashio::config 'gpio_platform'); else GPIO_PLATFORM="none";fi if bashio::config.has_value "hardware.sender"; then SENDER=$(bashio::config 'hardware.sender'); else SENDER=-1; fi if bashio::config.has_value "hardware.receiver"; then RECEIVER=$(bashio::config 'hardware.receiver'); else RECEIVER=-1; fi -if bashio::config.has_value "debug"; then if bashio::config.true "debug"; then DEBUG="-D"; else DEBUG=""; fi; fi # Output detected variables bashio::log.info "GPIO Platform used: $GPIO_PLATFORM" @@ -19,8 +18,8 @@ sed -i 's/\("receiver"\): \?".*"\(.*\)/\1: "'$RECEIVER'"\2/' /etc/pilight/config if bashio::config.true "debug"; then bashio::log.warning "Starting Pilight daemon in debug Mode" + /usr/local/sbin/pilight-daemon -F -D else bashio::log.info "Starting Pilight daemon" + /usr/local/sbin/pilight-daemon -F fi - -/usr/local/sbin/pilight-daemon -F "$DEBUG"