@ -93,15 +93,22 @@ pushd .
@@ -93,15 +93,22 @@ pushd .
cd /opt/mistborn
git submodule update --init --recursive
# get os and distro
source ./scripts/subinstallers/platform.sh
# initial load update package list
if [ " $DISTRO " = = "ubuntu" ] || [ " $DISTRO " = = "debian" ] || [ " $DISTRO " = = "raspbian" ] ; then
sudo apt-get update
elif [ " $DISTRO " = = "arch" ] ; then
sudo pacman -Syyy
fi
# install figlet
if [ " $DISTRO " = = "ubuntu" ] || [ " $DISTRO " = = "debian" ] || [ " $DISTRO " = = "raspbian" ] ; then
sudo apt-get install -y figlet
# get os and distro
source ./scripts/subinstallers/platform.sh
elif [ " $DISTRO " = = "arch" ] ; then
sudo pacman -S --noconfirm figlet
fi
# iptables
echo "Setting up firewall (iptables)"
@ -125,13 +132,19 @@ sudo systemctl enable ssh
@@ -125,13 +132,19 @@ sudo systemctl enable ssh
sudo systemctl restart ssh
# Additional tools fail2ban
if [ " $DISTRO " = = "ubuntu" ] || [ " $DISTRO " = = "debian" ] || [ " $DISTRO " = = "raspbian" ] ; then
sudo apt-get install -y dnsutils fail2ban
elif [ " $DISTRO " = = "arch" ] ; then
sudo pacman -S --noconfirm bind-tools fail2ban
fi
# Install kernel headers
if [ " $DISTRO " = = "ubuntu" ] || [ " $DISTRO " = = "debian" ] ; then
sudo apt install -y linux-headers-$( uname -r)
elif [ " $DISTRO " = = "raspbian" ] ; then
sudo apt-get install -y raspberrypi-kernel-headers
elif [ " $DISTRO " = = "arch" ] ; then
sudo pacman -S --noconfirm linux-lts-headers
fi
# Wireugard
@ -143,7 +156,7 @@ sudo systemctl enable docker
@@ -143,7 +156,7 @@ sudo systemctl enable docker
sudo systemctl start docker
# Unattended upgrades
sudo apt-get install -y unattended-upgrades
# sudo apt-get install -y unattended-upgrades
# Cockpit
if [ [ " $MISTBORN_INSTALL_COCKPIT " = ~ ^( [ yY] [ eE] [ sS] | [ yY] ) $ ] ]
@ -174,12 +187,12 @@ IPV4_PUBLIC="10.2.3.1"
@@ -174,12 +187,12 @@ IPV4_PUBLIC="10.2.3.1"
#fi
# unattended upgrades
sudo cp ./scripts/conf/20auto-upgrades /etc/apt/apt.conf.d/
sudo cp ./scripts/conf/50unattended-upgrades /etc/apt/apt.conf.d/
# sudo cp ./scripts/conf/20auto-upgrades /etc/apt/apt.conf.d/
# sudo cp ./scripts/conf/50unattended-upgrades /etc/apt/apt.conf.d/
sudo systemctl stop unattended-upgrades
# sudo systemctl stop unattended-upgrades
sudo systemctl daemon-reload
sudo systemctl restart unattended-upgrades
# sudo systemctl restart unattended-upgrades
# setup Mistborn services