server-scripts/jessie-server-common.sh
2016-03-15 23:26:31 +01:00

37 lines
961 B
Bash

#!/bin/bash
set -e
function main {
echo "Setup best practice default repositories, see http://httpredir.debian.org/"
tee /etc/apt/sources.list <<EOF
deb http://httpredir.debian.org/debian jessie main contrib
deb http://httpredir.debian.org/debian jessie-updates main contrib
deb http://httpredir.debian.org/debian jessie-backports main contrib
deb http://security.debian.org/ jessie/updates main
EOF
apt update
echo "Install important system tools."
apt install -y htop ne iotop curl wget zsh figlet iptraf
echo "Use zsh!"
wget -O /root/.zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
chsh -s /bin/zsh
( exec ne /etc/hostname /etc/hosts )
hostname -F /etc/hostname
echo "Nice motd."
figlet `hostname -f | sed 's/\./ \. /'` > /etc/motd
echo "Install system and security utils."
apt install -y systemd-cron apticron ssmtp logwatch
( exec ne /etc/ssmtp/* )
}
main