fix colors
This commit is contained in:
parent
76edaf4f67
commit
f65ec91dfb
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
function main {
|
{ # failed download protection
|
||||||
|
|
||||||
|
|
||||||
echo "Setup best practice default repositories, see http://httpredir.debian.org/"
|
echo "Setup best practice default repositories, see http://httpredir.debian.org/"
|
||||||
tee /etc/apt/sources.list <<EOF
|
tee /etc/apt/sources.list <<EOF
|
||||||
deb http://httpredir.debian.org/debian jessie main contrib
|
deb http://httpredir.debian.org/debian jessie main contrib
|
||||||
@ -12,9 +14,11 @@ function main {
|
|||||||
EOF
|
EOF
|
||||||
apt update
|
apt update
|
||||||
|
|
||||||
|
|
||||||
echo "Install important system tools."
|
echo "Install important system tools."
|
||||||
apt install -y htop ne iotop curl wget zsh figlet iptraf
|
apt install -y htop ne iotop curl wget zsh figlet iptraf
|
||||||
|
|
||||||
|
|
||||||
echo "Use zsh!"
|
echo "Use zsh!"
|
||||||
wget -O /root/.zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
|
wget -O /root/.zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
|
||||||
tee -a /root/.zshrc << EOF
|
tee -a /root/.zshrc << EOF
|
||||||
@ -23,14 +27,18 @@ RED="$(tput setaf 1)"
|
|||||||
ORANGE="$(tput setaf 3)"
|
ORANGE="$(tput setaf 3)"
|
||||||
BLUE="$(tput setaf 4)"
|
BLUE="$(tput setaf 4)"
|
||||||
BLACK="$(tput sgr0)"
|
BLACK="$(tput sgr0)"
|
||||||
|
colorls() {
|
||||||
|
/bin/ls -lh --color=yes $@ | sed -e "s/ \([0-9,.]\+K\) / ${BLUE}\1${BLACK} /g" -e "s/ \([0-9.,]\+G\) / ${RED}\1${BLACK} /g" -e "s/ \([0-9.,]\+M\) / ${ORANGE}\1${BLACK} /g"
|
||||||
|
}
|
||||||
alias ls='/bin/ls -h --color=auto'
|
alias ls='/bin/ls -h --color=auto'
|
||||||
alias l='/bin/ls -lh --color=yes | sed -e "s/ \([0-9,.]\+K\) / ${BLUE}\1${BLACK} /g" -e "s/ \([0-9.,]\+G\) / ${RED}\1${BLACK} /g" -e "s/ \([0-9.,]\+M\) / ${ORANGE}\1${BLACK} /g"'
|
alias l='colorls'
|
||||||
alias ll='/bin/ls -Alh --color=yes | sed -e "s/ \([0-9,.]\+K\) / ${BLUE}\1${BLACK} /g" -e "s/ \([0-9.,]\+G\) / ${RED}\1${BLACK} /g" -e "s/ \([0-9.,]\+M\) / ${ORANGE}\1${BLACK} /g"'
|
alias ll='colorls -A'
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
chsh -s /bin/zsh
|
chsh -s /bin/zsh
|
||||||
|
|
||||||
|
echo "Setup hostname."
|
||||||
( exec ne /etc/hostname /etc/hosts )
|
( exec ne /etc/hostname /etc/hosts )
|
||||||
|
|
||||||
hostname -F /etc/hostname
|
hostname -F /etc/hostname
|
||||||
|
|
||||||
echo "Nice motd."
|
echo "Nice motd."
|
||||||
@ -38,16 +46,12 @@ EOF
|
|||||||
|
|
||||||
echo "Install system and security utils."
|
echo "Install system and security utils."
|
||||||
apt install -y systemd-cron apticron ssmtp logwatch
|
apt install -y systemd-cron apticron ssmtp logwatch
|
||||||
|
|
||||||
( exec ne /etc/ssmtp/* )
|
( exec ne /etc/ssmtp/* )
|
||||||
|
|
||||||
echo "Disable unneeded getty"
|
echo "Disable unneeded getty"
|
||||||
for i in {4..6} do;
|
for i in {4..6}; do
|
||||||
systemctl stop getty@tty$i.service
|
systemctl stop getty@tty$i.service
|
||||||
systemctl disable getty@tty$i.service
|
systemctl disable getty@tty$i.service
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
main
|
|
||||||
|
Loading…
Reference in New Issue
Block a user