run_duration

This commit is contained in:
Alexandre
2021-05-13 13:57:01 +02:00
committed by GitHub
parent f53f1f70e5
commit 5e0509d628

View File

@@ -49,8 +49,8 @@ exec nginx || bashio::log.fatal "... Nginx not started, only access through webu
# TIMEOUT #
###########
if bashio::config.has_value 'run_for_hours'; then
RUNTIME=$(bashio::config 'run_for_hours')
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 !" && \