Initial setup

by vijayk17
1 deployments · 0 still active · last rev. 1 year ago

New deployment

Compatible with: Debian 7, Ubuntu 14.04 LTS, Ubuntu 12.04 LTS
						#!/bin/bash
# This block defines the variables the user of the script needs to input
# when deploying using this script.
#
#
#<UDF name="enterprise" label="The hostname for the new Linode.">
# HOSTNAME=enterprise
#
#<UDF name="fqdn" label="The new Linode's Fully Qualified Domain Name">
# FQDN=enterprise

# 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