Projet

Général

Profil

Révision f6a8f2be

IDf6a8f2beb1f39e3c4165429dec42175b178433b4
Parent 00149864
Enfant 651f6ac0

Ajouté par Lars Kruse il y a plus de 7 ans

Plugin minecraft-users-ram_: reduce scope of LC_LANG override

Voir les différences:

plugins/minecraft/minecraft-users-ram_
32 32

  
33 33
=cut
34 34

  
35
LC_LANG=C
35

  
36 36
MC_PORT=${0##*_}
37 37
 
38 38
if [ "$1" = "config" ]
......
47 47
    exit 0
48 48
fi
49 49

  
50
PLAYERCOUNT=$(netstat -tn | grep ":$MC_PORT " | grep ESTABLISHED | wc -l)
50
PLAYERCOUNT=$(LC_LANG=C netstat -tn | grep ":$MC_PORT " | grep ESTABLISHED | wc -l)
51 51
MC_PID=$(netstat -tlpn | grep ":$MC_PORT " | sed -n -e '1p' | awk '{ print $7 }' | cut -d '/' -f1)
52 52
if [ ! -z "${MC_PID}" ]
53 53
then #is running

Formats disponibles : Unified diff