mirror of
https://github.com/Mesteriis/hassio-addons-avm.git
synced 2026-01-09 23:11:02 +01:00
19 lines
424 B
Plaintext
19 lines
424 B
Plaintext
#!/usr/bin/with-contenv bashio
|
|
set -e
|
|
|
|
bashio::log.info 'Start docker statistics'
|
|
|
|
if bashio::config.has_value 'update_interval'; then
|
|
export STATS_UPDATE_INTERVAL=$(bashio::config 'update_interval')
|
|
fi
|
|
|
|
if [ ! -d /container-stats/db ] && bashio::config 'persistent'; then
|
|
[ ! -d /data/db ] && mkdir -p /data/db
|
|
ln -s /data/db/ /container-stats/db
|
|
else
|
|
mkdir -p /container-stats/db
|
|
fi
|
|
|
|
cd /container-stats
|
|
node stats.js
|