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 # # TIMEOUT #
########### ###########
if bashio::config.has_value 'run_duration'; then #if bashio::config.has_value 'run_duration'; then
RUNTIME=$(bashio::config 'run_duration') # RUNTIME=$(bashio::config 'run_duration')
bashio::log.info "... Addon will stop after $RUNTIME hours" # bashio::log.info "... Addon will stop after $RUNTIME hours"
sleep $TIMEOUT && \ # sleep $TIMEOUT && \
bashio::log.info "... Timeout achieved, addon will stop !" && \ # bashio::log.info "... Timeout achieved, addon will stop !" && \
kill "$PID" # kill "$PID"
else #else
bashio::log.info "... run_for_hours option not defined, addon will run continuously" # bashio::log.info "... run_duration option not defined, addon will run continuously"
fi #fi