mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-16 13:51:50 +02:00
Timeout message
This commit is contained in:
@@ -51,8 +51,11 @@ exec nginx || bashio::log.fatal "... Nginx not started, only access through webu
|
|||||||
if bashio::config.has_value 'run_for_hours'; then
|
if bashio::config.has_value 'run_for_hours'; then
|
||||||
RUNTIME=$(bashio::config 'run_for_hours')
|
RUNTIME=$(bashio::config 'run_for_hours')
|
||||||
bashio::log.info "... Addon will stop after $RUNTIME hours"
|
bashio::log.info "... Addon will stop after $RUNTIME hours"
|
||||||
sleep $TIMEOUT && kill "$PID"
|
sleep $TIMEOUT && \
|
||||||
|
kill "$PID" && \
|
||||||
|
bashio::log.info "... Timeout achieved, addon will stop !"
|
||||||
|
|
||||||
else
|
else
|
||||||
bashio::log.info "... run_for_hours option not defined, addon will run continuously
|
bashio::log.info "... run_for_hours option not defined, addon will run continuously"
|
||||||
fi"
|
fi"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user