Add new command for moulette: stats
This commit is contained in:
parent
973bc3f7b1
commit
0e0a93789e
21
commands/moulette/stats.sh
Normal file
21
commands/moulette/stats.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "$2" ]
|
||||||
|
then
|
||||||
|
echo "Usage: $0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! which gearman > /dev/null 2> /dev/null
|
||||||
|
then
|
||||||
|
echo "gearman isn't installed on this machine. Please try another one."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF | gearman -h gearmand-srv -p 4730 -f moulette_get
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<process>
|
||||||
|
<param name="type">moulette</param>
|
||||||
|
<param name="action">stats</param>
|
||||||
|
</process>
|
||||||
|
EOF
|
Reference in New Issue
Block a user