Révision f6a8f2be
Plugin minecraft-users-ram_: reduce scope of LC_LANG override
| 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