From 58a17409a03cc7ae695847ec0dce699a5afdb455 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Thu, 18 Nov 2021 14:24:53 +0000 Subject: [PATCH] Correction de legacy --- rapport_activite/rapport_activites.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rapport_activite/rapport_activites.sh b/rapport_activite/rapport_activites.sh index a406912..973e85e 100755 --- a/rapport_activite/rapport_activites.sh +++ b/rapport_activite/rapport_activites.sh @@ -1,11 +1,11 @@ #! /bin/bash -STORAGE_DIR="/var/www/xmpp.chapril.org/upload/" +STORAGE_DIR="/var/www/xmpp.chalec.org/upload/" main() { echo "h2. ## Global info" echo "" - echo "* Total accounts: $(sudo -u ejabberd ejabberdctl registered_users chapril.org | egrep -v -e 'r\.giskard' -e '(lisa|bart)\.simpson' | wc -l)" + echo "* Total accounts: $(sudo -u ejabberd ejabberdctl registered_users chalec.org | egrep -v -e 'r\.giskard' -e '(lisa|bart)\.simpson' | wc -l)" echo "** Active: $(count_active_accounts)" echo "** Inactive: $(count_inactive_accounts '1 MONTH')" echo "** Removable: $(count_removable_accounts '6 MONTHS')" @@ -92,7 +92,7 @@ count_removable_accounts() { join users u on l.username = u.username join spool s on l.username = s.username where to_timestamp(cast(l.seconds as int)) < current_timestamp - interval '${since}' - and s.xml like '%from=''chapril.org'' xmlns=''jabber:client''%Bienvenue sur le serveur%' + and s.xml like '%from=''chalec.org'' xmlns=''jabber:client''%Bienvenue sur le serveur%' and s.username not in ('r.giskard', 'lisa.simpson', 'bart.simpson')" psql -U ejabberd -h localhost ejabberd -c "${sql}" -t | grep -v '^$' | awk '{print $1}' @@ -135,7 +135,7 @@ count_biboumi_active_external_users() { from muclogline_ as m2 where m2.owner_ = m1.owner_ ) ) as m0 where to_timestamp(m0.date_) > current_timestamp - interval '${since}' - and m0.owner_ not like '%chapril.org%'" + and m0.owner_ not like '%chalec.org%'" sudo -Hiu postgres psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}' } @@ -166,7 +166,7 @@ count_biboumi_inactive_external_users() { from muclogline_ as m2 where m2.owner_ = m1.owner_ ) ) as m0 where to_timestamp(m0.date_) < current_timestamp - interval '${since}' - and m0.owner_ not like '%chapril.org%'" + and m0.owner_ not like '%chalec.org%'" sudo -Hiu postgres psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}' }