#!/bin/bash
# Derek's Debian preseed initialization script

## allow root ssh
tasksel install ssh-server
echo 'PermitRootLogin yes' > /etc/ssh/sshd_config.d/PermitRootLogin_yes
echo 'HashKnownHosts no' > /etc/ssh/ssh_config.d/HashKnownHosts_no
systemctl restart sshd

## show ip before login
u="http://repo.sxl.net/nix/ps_showip.sh"
f="/etc/network/if-up.d/showip"
curl -o "$f" "$u" ; chmod +x "$f"

## download debinit.sh
cd /root || exit
curl -LO https://repo.sxl.net/nix/debinit12.sh
chmod +x debinit12.sh
