mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 10:39:53 +00:00
Plugin minecraft-users-ram_: reduce scope of LC_LANG override
This commit is contained in:
parent
00149864b2
commit
f6a8f2beb1
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ Some more instructions: http://wiki.natenom.name/minecraft/munin-plugin
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
LC_LANG=C
|
|
||||||
MC_PORT=${0##*_}
|
MC_PORT=${0##*_}
|
||||||
|
|
||||||
if [ "$1" = "config" ]
|
if [ "$1" = "config" ]
|
||||||
|
@ -47,7 +47,7 @@ then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PLAYERCOUNT=$(netstat -tn | grep ":$MC_PORT " | grep ESTABLISHED | wc -l)
|
PLAYERCOUNT=$(LC_LANG=C netstat -tn | grep ":$MC_PORT " | grep ESTABLISHED | wc -l)
|
||||||
MC_PID=$(netstat -tlpn | grep ":$MC_PORT " | sed -n -e '1p' | awk '{ print $7 }' | cut -d '/' -f1)
|
MC_PID=$(netstat -tlpn | grep ":$MC_PORT " | sed -n -e '1p' | awk '{ print $7 }' | cut -d '/' -f1)
|
||||||
if [ ! -z "${MC_PID}" ]
|
if [ ! -z "${MC_PID}" ]
|
||||||
then #is running
|
then #is running
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue