root / plugins / mail / eoc_subscribers_count @ e5ce7492
Historique | Voir | Annoter | Télécharger (878 octets)
| 1 | fc1a074f | Julien Danjou | #!/bin/sh |
|---|---|---|---|
| 2 | # |
||
| 3 | # Plugin to the number of subscribers to a EOC list. |
||
| 4 | # |
||
| 5 | # Copyright (C) 2009 - Julien Danjou <julien@danjou.info> |
||
| 6 | # Licensed under WTFPL |
||
| 7 | # |
||
| 8 | # Standard config options you may want to set: |
||
| 9 | # [eoc_*] |
||
| 10 | # user list |
||
| 11 | # env.HOME /var/list |
||
| 12 | # |
||
| 13 | # Magic markers - optional - used by installation scripts and |
||
| 14 | # munin-config: |
||
| 15 | # |
||
| 16 | #%# family=manual |
||
| 17 | #%# capabilities=autoconf |
||
| 18 | |||
| 19 | if [ "$1" = "autoconf" ]; then |
||
| 20 | echo yes |
||
| 21 | exit 0 |
||
| 22 | fi |
||
| 23 | |||
| 24 | LISTNAME=`basename $0 | sed 's/^eoc_subscribers_count_//g' | tr '_' '@'` |
||
| 25 | |||
| 26 | if [ "$1" = "config" ]; then |
||
| 27 | |||
| 28 | echo 'graph_title Number of subscribers to '${LISTNAME}
|
||
| 29 | echo 'graph_vlabel subscribers' |
||
| 30 | echo 'graph_category mailinglist' |
||
| 31 | echo 'subscribers.label subscribers' |
||
| 32 | echo 'subscribers.draw AREA' |
||
| 33 | echo 'subscribers.info Number of subscribers to the list' |
||
| 34 | exit 0 |
||
| 35 | fi |
||
| 36 | |||
| 37 | echo -n subscribers.value\ |
||
| 38 | enemies-of-carlotta --name ${LISTNAME} --list | wc -l |
