mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-19 19:18:10 +01:00
run_duration
This commit is contained in:
@@ -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 !" && \
|
||||
|
||||
Reference in New Issue
Block a user