Skip to content

Instantly share code, notes, and snippets.

@gpittau
Created October 28, 2012 21:51
Show Gist options
  • Save gpittau/3970060 to your computer and use it in GitHub Desktop.
Save gpittau/3970060 to your computer and use it in GitHub Desktop.
init
#!bash
#run as root
install()
{
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o DPkg::Options::=--force-confdef \
-o DPkg::Options::=--force-confold \
install $@
}
username="${1:-gpittau}"
apt_key= "${2:-F430BBA5}"
adduser $username
###
echo "deb http://ppa.launchpad.net/byobu/ppa/ubuntu lucid main" >> /etc/apt/sources.list.d/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $apt_key
###
apt-get update
###
install vim
ln -sf /usr/bin/vim /usr/local/bin/vim
###
install sudo
sed -i -e"/^root/{h;p;N;s/root/$username/g}" /etc/sudoers
###
install tmux byobu
bash -c "$(curl -fsSL https://raw.github.com/gist/3970060/adduser-init.sh)" && source ~/.bashrc
@gpittau
Copy link
Author

gpittau commented Oct 29, 2012

bash -c "$(curl -fsSL https://raw.github.com/gist/3970060/adduser-init.sh)" && source ~/.bashrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment