Merge branch 'master' of ssh://forge.april.org:222/Chapril/mobilizon.chapril.org-tools
This commit is contained in:
commit
d51311a0c5
@ -34,7 +34,7 @@ else
|
|||||||
result=0
|
result=0
|
||||||
else
|
else
|
||||||
echo "WARNING : new version available, current is $currentVersion, last is $lastVersion."
|
echo "WARNING : new version available, current is $currentVersion, last is $lastVersion."
|
||||||
result=2
|
result=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit $result
|
exit $result
|
@ -1 +0,0 @@
|
|||||||
5 0 1 * * root /srv/mobilizon.chapril.org/tools/rapport_activite/rapport_activite.sh -p >> /srv/mobilizon.chapril.org/Exploitation/rapport_mobilizon.log 2>&1
|
|
@ -1,2 +0,0 @@
|
|||||||
#
|
|
||||||
5 0 1 * * root /srv/mobilizon.chapril.org/tools/rapport_activite/update_redmine_ticket.sh > /var/log/mobilizonchaprilorg-cron.log 2>&1
|
|
@ -0,0 +1,2 @@
|
|||||||
|
#
|
||||||
|
5 0 1 * * root /srv/mobilizon.chapril.org/tools/rapport_activite/update_redmine_ticket.sh > /var/log/mobilizon.chapril.org/rapportactivite-cron.log 2>&1
|
@ -83,14 +83,6 @@ generateHTTPReport()
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
# display the value of a key in the json fetched with curl
|
|
||||||
function show
|
|
||||||
{
|
|
||||||
# to navigate to sub keys like data.statistics.my_key , we must use multiple -e extract options
|
|
||||||
local value=$(echo "$json" | jshon -e "data" -e "statistics" -e $1 -u)
|
|
||||||
printf "$1=$value\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
generateSpecificReport()
|
generateSpecificReport()
|
||||||
{
|
{
|
||||||
@ -116,17 +108,17 @@ generateSpecificReport()
|
|||||||
echo "Nombre d'ipv6 utilisatrices du service = $ipv6UserCount"
|
echo "Nombre d'ipv6 utilisatrices du service = $ipv6UserCount"
|
||||||
|
|
||||||
echo "Nombre total d'ip utilisatrices du service = $((ipv4UserCount+ipv6UserCount))"
|
echo "Nombre total d'ip utilisatrices du service = $((ipv4UserCount+ipv6UserCount))"
|
||||||
echo "Nombre total d'erreurs = $errorsCount"
|
echo "Nombre total d'erreurs = $errorsCount"
|
||||||
|
echo "Nombre d'évènements = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfEvents" -u)"
|
||||||
|
echo "Nombre d'évènements locaux = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfLocalEvents" -u)"
|
||||||
|
echo "Nombre de groupes = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfGroups" -u)"
|
||||||
|
echo "Nombre de groupes locaux = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfLocalGroups" -u)"
|
||||||
|
echo "Nombre de commentaires = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfComments" -u)"
|
||||||
|
echo "Nombre de commentaires locaux = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfLocalComments" -u)"
|
||||||
|
echo "Nombre d'instances abonnées = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfInstanceFollowers" -u)"
|
||||||
|
echo "Nombre d'instances suivies = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfInstanceFollowings" -u)"
|
||||||
|
echo "Nombre d'utilisateurices selon l'api = $(echo "$json" | jshon -e "data" -e "statistics" -e "numberOfUsers" -u)"
|
||||||
|
|
||||||
show "numberOfEvents"
|
|
||||||
show "numberOfLocalEvents"
|
|
||||||
show "numberOfGroups"
|
|
||||||
show "numberOfLocalGroups"
|
|
||||||
show "numberOfComments"
|
|
||||||
show "numberOfLocalComments"
|
|
||||||
show "numberOfInstanceFollowers"
|
|
||||||
show "numberOfInstanceFollowings"
|
|
||||||
show "numberOfUsers"
|
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user