#!/bin/bash set -e function main { echo "Setup best practice default repositories, see http://httpredir.debian.org/" tee /etc/apt/sources.list < /etc/motd echo "Install system and security utils." apt install -y systemd-cron apticron ssmtp logwatch ( exec ne /etc/ssmtp/* ) echo "Disable unneeded getty" for i in {4..6} do; systemctl stop getty@tty$i.service systemctl disable getty@tty$i.service done } main