From baa09328c45c4e98223eedf6ac4ee3f3a060947a Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Sun, 16 Jun 2024 18:31:56 +0200 Subject: [PATCH] =?UTF-8?q?rapport=20activit=C3=A9:=20suppression=20des=20?= =?UTF-8?q?warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supprime ces warnings: could not change directory to "/root": Permission non accordée --- rapport_activite/rapport_activite_mineclone2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rapport_activite/rapport_activite_mineclone2.sh b/rapport_activite/rapport_activite_mineclone2.sh index 8c6eb46..447572a 100755 --- a/rapport_activite/rapport_activite_mineclone2.sh +++ b/rapport_activite/rapport_activite_mineclone2.sh @@ -58,7 +58,7 @@ generateReport() deadCount=$(zgrep " died at " /var/log/minetest/30009-mineclone2.log-${month}* | wc -l) echo "Nombre de morts = $deadCount" - accountTotalCount=$(su -c "psql -U postgres -d minetest-auth --tuples-only -c \"SELECT COUNT(*) FROM auth\"" postgres | xargs 2> /dev/null) + accountTotalCount=$(su -l -c "psql -U postgres -d minetest-auth --tuples-only -c \"SELECT COUNT(*) FROM auth\"" postgres | xargs 2> /dev/null) echo "Nombre de comptes total = $accountTotalCount" warningCount=$(zgrep "WARNING" /var/log/minetest/30009-mineclone2.log-${month}* | wc -l) @@ -67,7 +67,7 @@ generateReport() errorCount=$(zgrep "ERROR" /var/log/minetest/30009-mineclone2.log-${month}* | wc -l) echo "Nombre d'erreurs = $errorCount" - mcl2_databasesSize=$(su -c "psql -U postgres --tuples-only -c \"SELECT ROUND((CAST(SUM(pg_database_size(datname)) AS decimal) / 1024 / 1024)::numeric, 2) FROM pg_database WHERE datname LIKE 'minetest%mineclone2'\"" postgres | xargs 2> /dev/null) + mcl2_databasesSize=$(su -l -c "psql -U postgres --tuples-only -c \"SELECT ROUND((CAST(SUM(pg_database_size(datname)) AS decimal) / 1024 / 1024)::numeric, 2) FROM pg_database WHERE datname LIKE 'minetest%mineclone2'\"" postgres | xargs 2> /dev/null) echo "Taille des bases de données mineclone2 = $mcl2_databasesSize MB" echo -e "\n"