mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-02-07 04:14:53 +01:00
16 lines
404 B
Plaintext
16 lines
404 B
Plaintext
#!/usr/bin/with-contenv bashio
|
|
|
|
###########
|
|
# TIMEOUT #
|
|
###########
|
|
|
|
if bashio::config.has_value 'run_duration'; then
|
|
RUNTIME=$(bashio::config 'run_duration')
|
|
bashio::log.info "Addon will stop after $RUNTIME"
|
|
sleep $RUNTIME && \
|
|
bashio::log.info "Timeout achieved, addon will stop !" && \
|
|
exec ./finish
|
|
else
|
|
bashio::log.info "run_duration option not defined, addon will run continuously"
|
|
fi
|