diff --git a/rapport_activite/rapport_activite.sh b/rapport_activite/rapport_activite.sh index cf47e24..c1b17b9 100755 --- a/rapport_activite/rapport_activite.sh +++ b/rapport_activite/rapport_activite.sh @@ -24,6 +24,8 @@ LOG_PREFIX="/var/log/apache2/benevalibre.chapril.org/benevalibre.chapril.org" SERVICE_NAME="benevalibre.chapril.org" +APPLICATION_USER="www-data" +APPLICATION_PATH="$(getent passwd $APPLICATION_USER | cut -d: -f6)/benevalibre.chapril.org/benevalibre" source "/etc/benevalibre.chapril.org/benevalibrechaprilorg.conf" @@ -94,6 +96,17 @@ generateSpecificReport() echo } +# +generateBenevalibreStats() +{ + echo "=§= Éléments statistiques" + echo + + sudo -u $APPLICATION_USER $APPLICATION_PATH/venv/bin/python $APPLICATION_PATH/manage.py dump_stats + + echo +} + # generateReport() { @@ -103,6 +116,7 @@ generateReport() echo generateHTTPReport "$1" "$2" "$3" generateSpecificReport "$1" "$2" "$3" + generateBenevalibreStats }