by hamatoner
0 deployments · 0 still active · last rev. 3 years ago


Compatible with: No distros currently supported
# This block defines the variables the user of the script needs to input
# when deploying using this script. 
#<UDF name="hostname" label="The hostname for the new Linode.">
#<UDF name="fqdn" label="The new Linode's Fully Qualified Domain Name">
# This sets the variable $IPADDR to the IP address the new Linode receives. 
IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')
# This updates the packages on the system from the distribution repositories. 
apt-get update 
apt-get upgrade -y
# This section sets the hostname. 
echo $HOSTNAME > /etc/hostname 
hostname -F /etc/hostname
# This section sets the Fully Qualified Domain Name (FQDN) in the hosts file. 
echo $IPADDR $FQDN $HOSTNAME >> /etc/hosts