#!/bin/sh
if ! which gearman > /dev/null 2> /dev/null
then
echo "gearman isn't installed on this machine. Please try another one."
exit 1
fi
ACTION=
if [ -n "$1" ]
then
if [ "$1" = "flush" ]
then
ACTION=" flush
"
else
echo "Unknown action '$1'"
exit 1
fi
fi
cat <
stats
$ACTION
EOF
echo