From f6a8f2beb1f39e3c4165429dec42175b178433b4 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Wed, 11 Jul 2018 19:29:49 +0200 Subject: [PATCH] Plugin minecraft-users-ram_: reduce scope of LC_LANG override --- plugins/minecraft/minecraft-users-ram_ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/minecraft/minecraft-users-ram_ b/plugins/minecraft/minecraft-users-ram_ index 7e1d18d6..49c4e59c 100755 --- a/plugins/minecraft/minecraft-users-ram_ +++ b/plugins/minecraft/minecraft-users-ram_ @@ -32,7 +32,7 @@ Some more instructions: http://wiki.natenom.name/minecraft/munin-plugin =cut -LC_LANG=C + MC_PORT=${0##*_} if [ "$1" = "config" ] @@ -47,7 +47,7 @@ then exit 0 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) if [ ! -z "${MC_PID}" ] then #is running