Mistborn is your own virtual private cloud platform and WebUI that manages self hosted services, and secures them with firewall, Wireguard VPN w/ PiHole-DNSCrypt, and IP filtering. Optional SIEM+IDS. Supports 2FA, Nextcloud, Jitsi, Home Assistant, +
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.4 KiB

6 years ago
#!/bin/bash
# Cockpit
figlet "Mistborn: Installing Cockpit"
6 years ago
if [ "$DISTRO" == "ubuntu" ]; then
echo "Ubuntu backports enabled by default"
elif [ "$DISTRO" == "debian" ]; then
sudo grep -qF "buster-backports" /etc/apt/sources.list.d/backports.list \
&& 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
echo "Raspbian repos contain cockpit"
elif [ "$DISTRO" == "arch"]; then
echo "Arch Linux repos contain cockpit"
6 years ago
fi
6 years ago
if [ "$DISTRO" == "ubuntu" ] || [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ] ; then
sudo apt-get install -y cockpit
elif ["$DISTRO" == "arch"]; then
sudo pacman -S --noconfirm cockpit
fi
6 years ago
if [ "$DISTRO" == "ubuntu" ] || [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ] ; then
if $(sudo apt-cache show cockpit-docker > /dev/null 2>&1) ; then
# no longer supported upstream in Ubuntu 20.04
sudo apt-get install -y cockpit-docker
fi
elif ["$DISTRO" == "arch"]; then
sudo pacman -S --noconfirm cockpit-docker
6 years ago
fi
6 years ago
sudo cp ./scripts/conf/cockpit.conf /etc/cockpit/cockpit.conf
sudo systemctl restart cockpit.socket
# create system cockpit user
echo "Creating cockpit user"
sudo useradd -s /bin/bash -d /home/cockpit -m -G sudo -p $(openssl passwd -1 "$MISTBORN_DEFAULT_PASSWORD") cockpit || true