Update run.sh

This commit is contained in:
Alexandre
2021-05-13 14:09:26 +02:00
committed by GitHub
parent 5e0509d628
commit efd2a4083d

View File

@@ -49,12 +49,12 @@ exec nginx || bashio::log.fatal "... Nginx not started, only access through webu
# TIMEOUT #
###########
if bashio::config.has_value 'run_duration'; then
RUNTIME=$(bashio::config 'run_duration')
bashio::log.info "... Addon will stop after $RUNTIME hours"
sleep $TIMEOUT && \
bashio::log.info "... Timeout achieved, addon will stop !" && \
kill "$PID"
else
bashio::log.info "... run_for_hours option not defined, addon will run continuously"
fi
#if bashio::config.has_value 'run_duration'; then
# RUNTIME=$(bashio::config 'run_duration')
# bashio::log.info "... Addon will stop after $RUNTIME hours"
# sleep $TIMEOUT && \
# bashio::log.info "... Timeout achieved, addon will stop !" && \
# kill "$PID"
#else
# bashio::log.info "... run_duration option not defined, addon will run continuously"
#fi