summaryrefslogtreecommitdiff
path: root/files/munin/ejabberd_registrations.cron
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-17 19:48:32 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-17 19:48:32 -0200
commitf02b06b19f88ca10a6ee8d1e93d7128445f2501b (patch)
treeced2e18a130d9d69b7c897de6f4e8b7db821806b /files/munin/ejabberd_registrations.cron
parentae70891c89c9e6f0c9a77e75dd64905a25ebc221 (diff)
parent199551906b8eca94e23c16b5619c206488cc112a (diff)
downloadpuppet-ejabberd-master.tar.gz
puppet-ejabberd-master.tar.bz2
Merge branch 'master' of git://git.puppet.immerda.ch/module-ejabberdHEADmaster
Conflicts: manifests/base.pp
Diffstat (limited to 'files/munin/ejabberd_registrations.cron')
-rw-r--r--files/munin/ejabberd_registrations.cron8
1 files changed, 8 insertions, 0 deletions
diff --git a/files/munin/ejabberd_registrations.cron b/files/munin/ejabberd_registrations.cron
new file mode 100644
index 0000000..fc9de3e
--- /dev/null
+++ b/files/munin/ejabberd_registrations.cron
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+for host in `cat /etc/munin/plugin-conf.d/ejabberd_registrations.conf | grep env.vhosts | sed 's/env.vhosts //'`; do
+ stat_file="/var/lib/munin/plugin-state/ejabberd_registrations_${host}"
+ ejabberdctl registered-users $host > $stat_file
+ chgrp munin $stat_file
+ chmod o-rwx $stat_file
+done