<div dir="ltr">Good morning.<div><br></div><div>First of all, this is my first message and English is not my native language so patience, please.</div><div><br></div><div>Im trying to write a script for my xmobar to show my server status. Its mainly a physical server and 2 virtual machines.</div><div><br></div><div>I tried by sending ping and checking the response, but the xmobar freezes everytime its executed until it finishes the run.</div><div><br></div><div>How can I fix it?</div><div><br>Thanks in advance !</div><div><br></div><div><br></div><div><b>checkserver.sh</b></div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">#! /bin/bash<br>paping -p 81 -c 1 <a href="http://host.no-ip.org">host.no-ip.org</a> > /dev/null 2>&1<br>if [ $? -ne 0 ]<br>then<br>    VM0=0<br>else<br>    VM0=1<br>fi<br>paping -p 82 -c 1 <a href="http://host.no-ip.org">host.no-ip.org</a> > /dev/null 2>&1<br>if [ $? -ne 0 ]<br>then<br>    VM1=0<br>else<br>    VM1=1<br>fi<br>echo "here should say something acording to the result"</blockquote><div><br></div><div><b>.xmobarrc</b></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">...<br>Run CommandReader "./home/inakim/.xmonad/checkServer.sh" "checkserver"<br>...</blockquote></div></div>