Resolve "Multifactor Authentication"
This commit is contained in:
Vendored
+4
-4
@@ -4,10 +4,10 @@ VAR_FILE=/opt/mistborn/.env
|
||||
|
||||
source /opt/mistborn/scripts/subinstallers/platform.sh
|
||||
|
||||
MISTBORN_DNS_BIND_IP="0.0.0.0"
|
||||
if [ "$DISTRO" == "ubuntu" ] && [ "$VERSION_ID" == "20.04" ]; then
|
||||
MISTBORN_DNS_BIND_IP="10.2.3.1"
|
||||
fi
|
||||
MISTBORN_DNS_BIND_IP="10.2.3.1"
|
||||
#if [ "$DISTRO" == "ubuntu" ] && [ "$VERSION_ID" == "20.04" ]; then
|
||||
# MISTBORN_DNS_BIND_IP="10.2.3.1"
|
||||
#fi
|
||||
|
||||
echo "MISTBORN_DNS_BIND_IP=${MISTBORN_DNS_BIND_IP}" | sudo tee ${VAR_FILE}
|
||||
sudo chown mistborn:mistborn ${VAR_FILE}
|
||||
|
||||
@@ -206,6 +206,7 @@ sudo mkdir -p ../mistborn_volumes/extra
|
||||
|
||||
# Traefik final setup (cockpit)
|
||||
cp ./compose/production/traefik/traefik.toml.template ./compose/production/traefik/traefik.toml
|
||||
|
||||
# setup tls certs
|
||||
source ./scripts/subinstallers/openssl.sh
|
||||
sudo rm -rf ../mistborn_volumes/base/tls
|
||||
|
||||
@@ -20,6 +20,8 @@ echo "#MAILGUN_API_KEY=" >> $DJANGO_PROD_FILE
|
||||
echo "#MAILGUN_API_URL=" >> $DJANGO_PROD_FILE
|
||||
echo "#SENTRY_DNS=" >> $DJANGO_PROD_FILE
|
||||
echo "MISTBORN_INSTALL_COCKPIT=$MISTBORN_INSTALL_COCKPIT" >> $DJANGO_PROD_FILE
|
||||
echo "MISTBORN_PORTAL_IP=10.2.3.1" >> $DJANGO_PROD_FILE
|
||||
echo "MISTBORN_PORTAL_PORT=5000" >> $DJANGO_PROD_FILE
|
||||
|
||||
# generate production .env file for postgresql
|
||||
POSTGRES_PROD_FILE="./.envs/.production/.postgres"
|
||||
|
||||
@@ -46,7 +46,8 @@ sudo iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
# if installing over SSH, add SSH rule
|
||||
if [ ! -z "${SSH_CLIENT}" ]; then
|
||||
SSH_SRC=$(echo $SSH_CLIENT | awk '{print $1}')
|
||||
sudo iptables -A INPUT -p tcp -s $SSH_SRC --dport 22 -j ACCEPT
|
||||
SSH_PRT=$(echo $SSH_CLIENT | awk '{print $3}')
|
||||
sudo iptables -A INPUT -p tcp -s $SSH_SRC --dport $SSH_PRT -j ACCEPT
|
||||
fi
|
||||
|
||||
# docker rules
|
||||
|
||||
@@ -10,11 +10,15 @@ sudo git -C /opt/mistborn submodule update --init --recursive
|
||||
# ensure mistborn-cli is installed
|
||||
sudo pip3 install -e /opt/mistborn/modules/mistborn-cli
|
||||
|
||||
# handle updates to Mistborn systemd scripts
|
||||
iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk 'NR==1{print $2}')
|
||||
sudo cp /opt/mistborn/scripts/services/Mistborn* /etc/systemd/system/
|
||||
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/User=root/User=mistborn/"
|
||||
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 systemctl daemon-reload
|
||||
sudo systemctl enable Mistborn-setup.service
|
||||
sudo systemctl restart Mistborn-setup.service
|
||||
|
||||
Reference in New Issue
Block a user