2014-09-05 21:41:50 +02:00
|
|
|
#!/bin/bash
|
2014-09-02 15:57:01 +02:00
|
|
|
|
2014-09-05 21:41:50 +02:00
|
|
|
function repository {
|
|
|
|
add-apt-repository -y ppa:ultradvorka/ppa
|
|
|
|
add-apt-repository -y ppa:webupd8team/java
|
|
|
|
}
|
2014-09-02 15:57:01 +02:00
|
|
|
|
2014-09-05 21:41:50 +02:00
|
|
|
function update-upgrade {
|
|
|
|
apt-get update -y
|
|
|
|
apt-get upgrade -y
|
|
|
|
}
|
2014-09-02 15:57:01 +02:00
|
|
|
|
2014-09-05 21:41:50 +02:00
|
|
|
function common {
|
|
|
|
# default shell
|
2014-09-07 21:46:07 +02:00
|
|
|
apt-get install -y sudo tmux mc tree pv vim mosh
|
2014-09-05 21:41:50 +02:00
|
|
|
# shell
|
|
|
|
apt-get install -y hh zsh
|
|
|
|
grep HH_CONFIG /etc/bash.bashrc || hh --show-configuration >> /etc/bash.bashrc
|
|
|
|
sed 's/\/bin\/bash/\/bin\/zsh/' /etc/passwd > /etc/passwd.new
|
|
|
|
mv /etc/passwd.new /etc/passwd
|
|
|
|
wget -O /etc/zsh/newuser.zshrc.recommended http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
|
|
|
|
cp /etc/zsh/newuser.zshrc.recommended /root/.zshrc
|
|
|
|
# diagnostics
|
|
|
|
apt-get install -y htop iotop iftop nmon powertop stress lm-sensors
|
|
|
|
# versioning
|
|
|
|
apt-get install -y git git-gui subversion libapache2-svn
|
|
|
|
# networking
|
2014-09-07 21:46:07 +02:00
|
|
|
apt-get install -y nfs-common cifs-utils aircrack-ng openvpn axel wget ethtool mii-tool
|
2014-09-05 21:41:50 +02:00
|
|
|
}
|
2014-09-02 15:57:01 +02:00
|
|
|
|
2014-09-05 21:47:00 +02:00
|
|
|
function common-end {
|
|
|
|
# configure system
|
|
|
|
apt-get install -y console-data keyboard-configuration manpages-de
|
|
|
|
sensors-detect
|
|
|
|
}
|
|
|
|
|
2014-09-05 21:41:50 +02:00
|
|
|
function client-gui {
|
|
|
|
# programs
|
|
|
|
apt-get install -y firefox firefox-locale-de thunderbird thunderbird-locale-de \
|
|
|
|
keepassx filezilla vlc gparted wireshark
|
|
|
|
# IDE
|
|
|
|
apt-get install -y eclipse
|
|
|
|
# OpenJDK
|
|
|
|
apt-get install -y openjdk-6-jdk openjdk-6-source openjdk-6-demo openjdk-6-doc \
|
2014-09-05 21:47:00 +02:00
|
|
|
openjdk-6-jre-headless openjdk-6-jre-lib
|
2014-09-05 21:41:50 +02:00
|
|
|
apt-get install -y openjdk-7-jdk openjdk-7-source openjdk-7-demo openjdk-7-doc \
|
2014-09-05 21:47:00 +02:00
|
|
|
openjdk-7-jre-headless openjdk-7-jre-lib
|
2014-09-05 21:41:50 +02:00
|
|
|
# Oracle Java
|
|
|
|
apt-get install -y oracle-java7-installer oracle-java8-installer
|
2014-09-05 21:47:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function client-gui-end {
|
2014-09-05 21:41:50 +02:00
|
|
|
# Java Plugin
|
|
|
|
update-alternatives --config mozilla-javaplugin.so
|
|
|
|
}
|
2014-09-02 15:57:01 +02:00
|
|
|
|
2014-09-05 21:41:50 +02:00
|
|
|
function server-gui {
|
|
|
|
# programs
|
|
|
|
apt-get install -y firefox firefox-locale-de thunderbird thunderbird-locale-de \
|
|
|
|
keepassx filezilla vlc gparted wireshark
|
|
|
|
# ssh
|
|
|
|
apt-get install -y openssh-server
|
|
|
|
}
|
2014-09-02 15:57:01 +02:00
|
|
|
|
2014-09-05 21:41:50 +02:00
|
|
|
function server-cli {
|
|
|
|
# ssh
|
|
|
|
apt-get install -y openssh-server
|
|
|
|
}
|
2014-09-02 15:57:01 +02:00
|
|
|
|
2014-09-05 21:41:50 +02:00
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
|
|
echo "This script must be run as root" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-09-02 15:57:01 +02:00
|
|
|
|
2014-09-05 21:41:50 +02:00
|
|
|
PS3='Please enter your system '
|
|
|
|
options=("client-gui" "server-cli" "server-gui" "Quit")
|
|
|
|
select opt in "${options[@]}"
|
|
|
|
do
|
|
|
|
case $opt in
|
|
|
|
"client-gui")
|
|
|
|
repository
|
|
|
|
update-upgrade
|
|
|
|
common
|
|
|
|
client-gui
|
2014-09-05 21:47:00 +02:00
|
|
|
common-end
|
|
|
|
client-gui-end
|
2014-09-05 21:41:50 +02:00
|
|
|
break
|
|
|
|
;;
|
|
|
|
"server-cli")
|
|
|
|
repository
|
|
|
|
update-upgrade
|
|
|
|
common
|
|
|
|
server-cli
|
2014-09-05 21:47:00 +02:00
|
|
|
common-end
|
2014-09-05 21:41:50 +02:00
|
|
|
break
|
|
|
|
;;
|
|
|
|
"server-gui")
|
|
|
|
repository
|
|
|
|
update-upgrade
|
|
|
|
common
|
|
|
|
server-gui
|
2014-09-05 21:47:00 +02:00
|
|
|
common-end
|
2014-09-05 21:41:50 +02:00
|
|
|
break
|
|
|
|
;;
|
|
|
|
*) echo invalid option;;
|
|
|
|
esac
|
2014-09-07 21:46:07 +02:00
|
|
|
done
|