Thread: ServerName
View Single Post
  #2   (View Single Post)  
Old 16th January 2009
glenbarber glenbarber is offline
Real Name: Glen Barber
/dev/urandom
 
Join Date: Nov 2008
Location: Philadelphia, PA, USA
Posts: 10
Default

Try this:
Code:
ping -c1 `hostname` >/dev/null && echo "success" || echo "You dont have your hostname in /etc/hosts"
Reply With Quote