From aefa3775fa5496363fcf801c73efb3e2c5872f32 Mon Sep 17 00:00:00 2001 From: Benzidane Date: Thu, 9 Sep 2021 15:19:06 +0200 Subject: [PATCH] add get_size --- utils/libre | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/utils/libre b/utils/libre index 2399fa0..2d0e400 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 -- GitLab