Created
April 13, 2011 20:39
-
-
Save uggedal/918358 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # <udf name="fqdn" label="Fully qualified domain name" /> | |
| PUBLIC_IP_ADDRESS=`ifconfig eth0 | awk -F':' '/inet addr/{split($2,_," ");print _[1]}'` | |
| echo $FQDN > /etc/hostname && hostname -F /etc/hostname | |
| echo $PUBLIC_IP_ADDRESS `hostname` `hostname -s` >> /etc/hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment