#!/bin/sh if [ "$1" = "autoconf" ]; then echo "yes" exit 0 fi if [ "$1" = "config" ]; then echo "graph_title irc channel users" echo "graph_info This graph shows the usercounts in selected channels" echo "graph_category irc" echo "graph_printf %.0lf" echo "graph_scale no" cat /tmp/irc/channels.txt | grep "#" | sed -E -e 's~#~~g' -e 's~[^a-zA-Z0-9 ]~_~g' | sort -u | sort -k 2nr | awk '{print $1".label "$1"\n"$1".draw LINE2" }' | head -n 15 exit 0 fi cat /tmp/irc/channels.txt | grep "#" | sed -E -e 's~#~~g' -e 's~[^a-zA-Z0-9 ]~_~g' | sort -u | sort -k 2nr | awk '{print $1".value "$2 }' | head -n 15 exit 0