Untitled

By Soft Bird, 11 Years ago, written in Plain Text, viewed 661 times.
URL http://pb.stoleyour.com/view/45965011 Embed
Download Paste or View RawExpand paste to full width of browser
  1. !/bin/bash
  2.  
  3. mcrcon_path="/usr/lib/nagios/plugins/mcrcon"
  4. mcrcon_host="SNIP"
  5. mcrcon_port="SNIP"
  6. mcrcon_password="SNIP"
  7.  
  8. mcrcon=`$mcrcon_path -c -H $mcrcon_host -P $mcrcon_port -p $mcrcon_password players | awk '{ print $3 }'`
  9. players=`echo $mcrcon | awk -F "/" ' {print $1} '`
  10. slots=`echo $mcrcon | awk -F "/" ' {print $2} '`
  11. echo "Players: $players / $slots | players=$players;;;0;$slots"

Reply to "Untitled"

Here you can reply to the paste above