Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- B3_LOG="/var/log/urbanterror/b3/status.xml"
- case $1 in
- autoconf)
- echo "yes"
- exit 0;;
- config)
- cat <<'EOM'
- graph_title Urban Terror player count
- graph_args --base 1000 -l 0
- graph_vlabel player
- graph_scale yes
- graph_category games
- graph_printf %3.0lf
- player.label player
- player.draw LINE2
- player.info Number of connected players
- player.colour 00FF00
- EOM
- exit 0;;
- esac
- B3_RUNNING=$(ps -efl | grep -v grep | grep b3_run.py | wc -l)
- if [ $B3_RUNNING -ne 0 ]; then
- PLAYER_CUR=$(cat $B3_LOG | grep "Clients Total" | cut -d "\"" -f2)
- else
- PLAYER_CUR="0"
- fi
- echo "player.value $PLAYER_CUR"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement