#!/usr/bin/env bash # ejabberd_stats_ revision 1 (Nov 2013) # # Tested with ejabberd 2.1.x # # This plugin is capable to show: # - ejabberd connected users # - in/out s2s connections # # Required permissions: # - run ejabberdctl # # OS: *NIX # # Author: Artem Sheremet # # Configuration: # - set env.ejabberdctl to ejabberdctl path #%# family=auto #%# capabilities=autoconf suggest EJABBERDCTL=${ejabberdctl:-$(which ejabberdctl)} SCRIPT_NAME=$(basename "$0") STATS_TYPE="${SCRIPT_NAME/ejabberd_stats_/}" function ejabberd_stats_connected_users() { local ejabberdctl_cmd=connected_users_number if [ "$1" = "config" ]; then cat <