Iñaki Malerba
2015-09-25 15:46:56 UTC
Good morning.
First of all, this is my first message and English is not my native
language so patience, please.
Im trying to write a script for my xmobar to show my server status. Its
mainly a physical server and 2 virtual machines.
I tried by sending ping and checking the response, but the xmobar freezes
everytime its executed until it finishes the run.
How can I fix it?
Thanks in advance !
*checkserver.sh*
#! /bin/bash
First of all, this is my first message and English is not my native
language so patience, please.
Im trying to write a script for my xmobar to show my server status. Its
mainly a physical server and 2 virtual machines.
I tried by sending ping and checking the response, but the xmobar freezes
everytime its executed until it finishes the run.
How can I fix it?
Thanks in advance !
*checkserver.sh*
#! /bin/bash
paping -p 81 -c 1 host.no-ip.org > /dev/null 2>&1
if [ $? -ne 0 ]
then
VM0=0
else
VM0=1
fi
paping -p 82 -c 1 host.no-ip.org > /dev/null 2>&1
if [ $? -ne 0 ]
then
VM1=0
else
VM1=1
fi
echo "here should say something acording to the result"
*.xmobarrc*if [ $? -ne 0 ]
then
VM0=0
else
VM0=1
fi
paping -p 82 -c 1 host.no-ip.org > /dev/null 2>&1
if [ $? -ne 0 ]
then
VM1=0
else
VM1=1
fi
echo "here should say something acording to the result"
...
Run CommandReader "./home/inakim/.xmonad/checkServer.sh" "checkserver"
...
Run CommandReader "./home/inakim/.xmonad/checkServer.sh" "checkserver"
...