Code:
#!/bin/bash
if ping -b -c 1 10.0.1.10
then
gnome-terminal -x ssh 10.0.1.10
else
gnome-terminal -x ssh www.mywebserver.com
fi
That's what is inside my .sh file that my 'Taskbar launcher' points to..
Result, if I am on the same local network as my web server
else I am at home the launcher still works.
However, the scripts always suffers from a slight delay while the ping result is sought regardless of where I am dialing in from.
If I just have the
blue line in the .sh file and connect from home the connection time is impressive (I use Keys). I'd like to retain that connection time.
Can anyone improve on the way I am establishing which i.p./domain to use?