1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-25 18:38:30 +00:00

small fix to get ejabberd PID for both 2.0 and 2.1.x ejabberd versions

This commit is contained in:
Peter Viskup 2010-11-13 23:00:21 +01:00 committed by Steve Schnepp
parent c2f5c1e441
commit 41f30b17af

View file

@ -78,9 +78,11 @@ if [ -z "$vhosts" ]; then
fi
# get ejabberd PID
#EJPID=$(pidof -s /usr/lib/erlang/erts-5.6.3/bin/beam.smp)
#EJPID=$(ps -ef | awk '/\/bin\/beam.smp/ && !/awk/ {print $2}')
EJPID=$(cat /var/run/ejabberd/ejabberd.pid)
if [[ ${EJVER%\.[0-9]} == 2.1 ]]; then
EJPID=$(cat /var/run/ejabberd/ejabberd.pid)
else
EJPID=$(ps -ef | awk '/\/bin\/beam.smp/ && !/awk/ {print $2}')
fi
if [ -z "$vhosts" ]; then
echo "No vhosts to sample." > /dev/stderr