diff --git a/utils/libre b/utils/libre index 2399fa0e371e62c83411cd9f187ece19961f1087..2d0e400ab78401e7c7bbbab386ad624c39522d61 100755 --- a/utils/libre +++ b/utils/libre @@ -37,6 +37,7 @@ function show_usage { echo " - update: to update the current folder." echo " - stats: show docker stats with names." echo " - delete : remove a libre.sh service." + echo " - getsize : give you the size of the installed application" exit 1 } @@ -100,6 +101,16 @@ case "$1" in rm /system/haproxy/haproxy/certs/${2}.pem fi fi;; + getsize) + # check the current size + if [ $# -ne 2 ]; then + echo "getsize requires a domainname argument." + exit 1 + fi + +SIZE="`du -hs ${2}`" +#SIZE=${SIZE%G*} +echo $(du -hs ${2}) |cut -d ' ' -f 1;; *) show_usage esac