Merge branch 'master' into 53-wifi

This commit is contained in:
Steven Foerster
2020-08-15 11:21:08 -04:00
21 changed files with 180 additions and 305 deletions
+7 -4
View File
@@ -69,9 +69,9 @@ fi
# Install Cockpit?
if [ -z "${MISTBORN_INSTALL_COCKPIT}" ]; then
read -p "Install Cockpit (a somewhat resource-heavy system management graphical user interface)? [Y/n]: " MISTBORN_INSTALL_COCKPIT
read -p "Install Cockpit (a somewhat resource-heavy system management graphical user interface -- NOT RECOMMENDED on Raspberry Pi)? [y/N]: " MISTBORN_INSTALL_COCKPIT
echo
MISTBORN_INSTALL_COCKPIT=${MISTBORN_INSTALL_COCKPIT:-Y}
MISTBORN_INSTALL_COCKPIT=${MISTBORN_INSTALL_COCKPIT:-N}
fi
# SSH keys
@@ -132,8 +132,11 @@ sudo -E apt-get install -y dnsutils fail2ban
# Install kernel headers
if [ "$DISTRO" == "ubuntu" ] || [ "$DISTRO" == "debian" ]; then
sudo -E apt install -y linux-headers-$(uname -r)
elif [ "$DISTRO" == "raspbian" ]; then
elif [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "raspios" ]; then
sudo -E apt install -y raspberrypi-kernel-headers
else
echo "Unsupported OS: $DISTRO"
exit 1
fi
# Wireugard
@@ -205,7 +208,7 @@ sudo mkdir -p ../mistborn_volumes/base/pihole/etc-dnsmasqd
sudo mkdir -p ../mistborn_volumes/extra
# Traefik final setup (cockpit)
cp ./compose/production/traefik/traefik.toml.template ./compose/production/traefik/traefik.toml
#cp ./compose/production/traefik/traefikv2.toml.template ./compose/production/traefik/traefik.toml
# setup tls certs
source ./scripts/subinstallers/openssl.sh
+1 -4
View File
@@ -10,11 +10,8 @@ elif [ "$DISTRO" == "debian" ]; then
&& echo "buster-backports already in sources" \
|| echo 'deb http://deb.debian.org/debian buster-backports main' | sudo tee -a /etc/apt/sources.list.d/backports.list
elif [ "$DISTRO" == "raspbian" ]; then
elif [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "raspios" ]; then
echo "Raspbian repos contain cockpit"
fi
sudo -E apt-get install -y cockpit
+1 -1
View File
@@ -16,5 +16,5 @@ fi
# set docker-compose path used in Mistborn
if [ ! -f /usr/local/bin/docker-compose ]; then
sudo ln -s $(which docker-compose) /usr/local/bin/docker-compose
sudo -E ln -s $(which docker-compose) /usr/local/bin/docker-compose
fi
+4 -4
View File
@@ -15,7 +15,7 @@ if [ "$DISTRO" == "ubuntu" ]; then
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
elif [ "$DISTRO" == "debian" ]; then
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
elif [ "$DISTRO" == "raspbian" ]; then
elif [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "raspios" ]; then
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
fi
@@ -31,7 +31,7 @@ elif [ "$DISTRO" == "debian" ]; then
"deb https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
elif [ "$DISTRO" == "raspbian" ]; then
elif [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "raspios" ]; then
echo "deb [arch=armhf] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list
@@ -43,7 +43,7 @@ sudo apt-get update
if [ "$DISTRO" == "ubuntu" ] || [ "$DISTRO" == "debian" ]; then
sudo -E apt-get install -y docker-ce docker-ce-cli containerd.io
elif [ "$DISTRO" == "raspbian" ]; then
elif [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "raspios" ]; then
sudo -E apt install -y --no-install-recommends \
docker-ce \
cgroupfs-mount
@@ -59,7 +59,7 @@ echo "Installing Docker Compose"
# sudo chmod +x /usr/local/bin/docker-compose
#elif [ "$DISTRO" == "raspbian" ]; then
# Install required packages
sudo -E apt install -y python-backports.ssl-match-hostname
#sudo -E apt install -y python-backports.ssl-match-hostname
# Install Docker Compose from pip
# This might take a while
+3 -2
View File
@@ -9,18 +9,19 @@ if ! $(sudo apt-cache show wireguard > /dev/null 2>&1) ; then
echo "Adding Wireguard PPAs"
# Wireguard
if [ "$DISTRO" == "raspbian" ]; then
if [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "raspios" ]; then
echo "Adding Wireguard repo keys"
sudo -E apt-get install -y dirmngr
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
fi
if [ "$DISTRO" == "ubuntu" ]; then
# Ubuntu
sudo add-apt-repository -y ppa:wireguard/wireguard
elif [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ]; then
elif [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "raspios" ]; then
# Debian
sudo bash -c 'echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list'
sudo bash -c "printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable"
+1 -1
View File
@@ -17,7 +17,7 @@ sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/DIFACE/$iface/"
# handle updates to traefik
sudo cp /opt/mistborn/compose/production/traefik/traefik.toml.template /opt/mistborn/compose/production/traefik/traefik.toml
#sudo cp /opt/mistborn/compose/production/traefik/traefik.toml.template /opt/mistborn/compose/production/traefik/traefik.toml
sudo systemctl daemon-reload
sudo systemctl enable Mistborn-setup.service