From d39a2474543df8aaf185d65b84b6478e850f9066 Mon Sep 17 00:00:00 2001 From: pitchum Date: Tue, 10 Nov 2020 19:29:47 +0100 Subject: [PATCH] Improve script rapport_activites.sh --- rapport_activite/rapport_activites.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rapport_activite/rapport_activites.sh b/rapport_activite/rapport_activites.sh index 6b3cc45..a6810ee 100755 --- a/rapport_activite/rapport_activites.sh +++ b/rapport_activite/rapport_activites.sh @@ -1,5 +1,7 @@ #! /bin/bash +STORAGE_DIR="/var/www/xmpp.chapril.org/upload/" + main() { echo "h2. ## Global info" echo "" @@ -11,7 +13,7 @@ main() { echo "h2. ## HTTP upload storage:" echo "" echo "* User quota: $(get_hard_quota)M" - echo "* Total disk usage: $(du -sh /srv/ejabberd/chapril.org/upload/ | awk '{print $1}')" + echo "* Total disk usage: $(du -sh ${STORAGE_DIR} | awk '{print $1}')" per_account_storage_usage # echo "s2s outgoing connections: $(sudo -u ejabberd ejabberdctl incoming_s2s_number)" # echo "s2s incoming connections: $(sudo -u ejabberd ejabberdctl outgoing_s2s_number)" @@ -22,7 +24,6 @@ get_hard_quota() { } per_account_storage_usage() { - STORAGE_DIR="/srv/ejabberd/chapril.org/upload/" # TODO Directories to ignore because they are used for tests accounts (bart and lisa simpsons) IGNORE_DIRS="35eae3ddc83d72e4d3fad3160a400db688d7d936 9be859c77649f33d207cbe0d74a126b2fd31cb33"