Add Containers

This commit is contained in:
Mattia Basaglia 2015-05-24 16:34:14 +02:00
parent 62ac481c37
commit c7977cd03f
2 changed files with 17 additions and 1 deletions

4
README
View file

@ -37,6 +37,10 @@ Config Variables:
* FSTYPE : file system type used to calculate disk usage (Uses df),
if empty it will show the total.
Requirements:
* lsb-release for Dirstro
* lxc for Containers
Generating Images
-----------------

View file

@ -103,6 +103,18 @@ function ponyget_Disk()
echo -e "$(pccolor $percent)$used\x1b[0m / $total"
}
function ponyget_Containers()
{
local active="$(lxc-ls --active | wc -l)"
local total="$(lxc-ls | wc -l)"
local color=32
if [ "$active" -lt "$total" ]
then
color=31
fi
echo -e "\x1b[$color;1m$active\x1b[0m / $total active"
}
function bold()
{
echo -en "\x1b[1m${*}\x1b[22m"