Some changes
This commit is contained in:
parent
275f75b561
commit
9beb3f0c50
27
install-debian.sh
Executable file → Normal file
27
install-debian.sh
Executable file → Normal file
@ -2,8 +2,10 @@
|
||||
|
||||
# functions
|
||||
function repository {
|
||||
apt-get install -y software-properties-common && (
|
||||
add-apt-repository -y ppa:ultradvorka/ppa
|
||||
add-apt-repository -y ppa:webupd8team/java
|
||||
)
|
||||
}
|
||||
|
||||
function update-upgrade {
|
||||
@ -13,30 +15,31 @@ function update-upgrade {
|
||||
|
||||
function common {
|
||||
# default shell
|
||||
apt-get install -y sudo tmux mc tree pv vim mosh bash-completion
|
||||
apt-get install -y sudo mc tree pv vim mosh bash-completion
|
||||
|
||||
# bash shell
|
||||
apt-get install -y hh
|
||||
apt-get install -y hh && (
|
||||
grep HH_CONFIG /etc/bash.bashrc || \
|
||||
hh --show-configuration >> /etc/bash.bashrc
|
||||
)
|
||||
|
||||
# zsh shell
|
||||
apt-get install -y zsh
|
||||
sed 's/\/bin\/bash/\/bin\/zsh/' /etc/passwd > /tmp/passwd
|
||||
mv -f /tmp/passwd /etc/passwd
|
||||
rm -f /tmp/passwd
|
||||
apt-get install -y zsh && (
|
||||
sed -i -- 's/\/bin\/bash/\/bin\/zsh/' /etc/passwd
|
||||
wget -O /etc/zsh/newuser.zshrc.recommended \
|
||||
http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
|
||||
root_user=$(grep ':0:' /etc/passwd | awk -F':' '{print $6}')
|
||||
default_user=$(grep ':1000:' /etc/passwd | awk -F':' '{print $6}')
|
||||
cp -f /etc/zsh/newuser.zshrc.recommended $default_user/.zshrc
|
||||
cp -f /etc/zsh/newuser.zshrc.recommended $root_user/.zshrc
|
||||
)
|
||||
|
||||
# tmux
|
||||
apt-get install -y tmux && (
|
||||
default_user=$(grep ':1000:' /etc/passwd | awk -F':' '{print $6}')
|
||||
echo 'if [ "$TMUX" = "" ]; then tmux; fi' | cat - $default_user/.zshrc > \
|
||||
/tmp/.zshrc && mv /tmp/.zshrc $default_user/.zshrc
|
||||
echo 'if [ "$TMUX" = "" ]; then tmux; fi' | cat - $root_user/.zshrc > \
|
||||
/tmp/.zshrc && mv /tmp/.zshrc $root_user/.zshrc
|
||||
)
|
||||
|
||||
# diagnostics
|
||||
apt-get install -y htop iotop iftop nmon powertop stress lm-sensors \
|
||||
@ -46,7 +49,7 @@ function common {
|
||||
apt-get install -y git subversion libapache2-svn build-essential
|
||||
|
||||
# networking
|
||||
apt-get install -y nfs-common cifs-utils aircrack-ng openvpn axel \
|
||||
apt-get install -y nfs-common cifs-utils openvpn axel \
|
||||
wget ethtool fping
|
||||
|
||||
# misc. tools
|
||||
@ -120,8 +123,8 @@ select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"client-gui")
|
||||
repository
|
||||
update-upgrade
|
||||
repository
|
||||
common
|
||||
client-gui
|
||||
common-end
|
||||
@ -129,16 +132,16 @@ do
|
||||
break
|
||||
;;
|
||||
"server-cli")
|
||||
repository
|
||||
update-upgrade
|
||||
repository
|
||||
common
|
||||
server-cli
|
||||
common-end
|
||||
break
|
||||
;;
|
||||
"server-gui")
|
||||
repository
|
||||
update-upgrade
|
||||
repository
|
||||
common
|
||||
server-gui
|
||||
common-end
|
||||
|
Loading…
Reference in New Issue
Block a user