This commit is contained in:
2021-08-24 14:35:11 +03:00
parent d8fba9335d
commit 4f37cb59b1
107 changed files with 3941 additions and 66 deletions

View File

@@ -0,0 +1,18 @@
#!/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

View File

@@ -0,0 +1,11 @@
#!/usr/bin/with-contenv bashio
set -e
if [ ! -d /container-stats/db ]; then
bashio::log.debug 'Wait for database'
sleep 2s
fi
bashio::log.info 'Start webserver'
cd /container-stats
node httpd.js