add logging

This commit is contained in:
Mario Fetka 2024-07-06 15:12:46 +02:00
parent b83d80ef90
commit 16905e5043

View File

@ -76,7 +76,7 @@ cmd_exec apt install lsb-release dpkg-dev wget curl figlet lolcat unzip whiptail
msg_ok "Installing needed base packages"
function header_info {
/usr/bin/env figlet -w 60 -c "Mystic BBS DbP Installer" | /usr/games/lolcat -f
cmd_exec /usr/bin/env figlet -w 60 -c "Mystic BBS DbP Installer" | /usr/games/lolcat -f
}
header_info
@ -138,29 +138,29 @@ msg_ok "adding bullseye repository to bookworm for python2"
fi
msg_info "Setting up ${APP} Repository"
apt install -y software-properties-common &>/dev/null
apt install -y software-properties-common &>$INSTALLLOG
if [ "${DIST}" = "Debian" ]; then
apt-add-repository -y contrib &>/dev/null
apt-add-repository -y non-free &>/dev/null
cmd_exec apt-add-repository -y contrib &>$INSTALLLOG
cmd_exec apt-add-repository -y non-free &>$INSTALLLOG
fi
if [ "${DIST}" = "Ubuntu" ]; then
apt-add-repository -y universe &>/dev/null
apt-add-repository -y restricted &>/dev/null
apt-add-repository -y multiverse &>/dev/null
cmd_exec apt-add-repository -y universe &>$INSTALLLOG
cmd_exec apt-add-repository -y restricted &>$INSTALLLOG
cmd_exec apt-add-repository -y multiverse &>$INSTALLLOG
fi
apt update &>/dev/null
apt install -y curl wget gnupg unzip unrar &>/dev/null
mkdir -p $MSTEMPDIR &>/dev/null
cmd_exec apt update &>$INSTALLLOG
cmd_exec apt install -y curl wget gnupg unzip unrar &>$INSTALLLOG
cmd_exec mkdir -p $MSTEMPDIR &>$INSTALLLOG
msg_ok "Setting up ${APP} Repository"
#==============================================================================================================
msg_info "Downloading ${APP} Mystic BBS Disconnected-by-Peer Installer Files"
wget -N https://gitea.disconnected-by-peer.at/geos_one/mystic/archive/main.zip -O $MSTEMPDIR/dbp-main.zip &>/dev/null
rm -rf $MSTEMPDIR/mystic &>/dev/null
pushd $MSTEMPDIR &>/dev/null
unzip dbp-main.zip &>/dev/null
popd &>/dev/null
cmd_exec wget -N https://gitea.disconnected-by-peer.at/geos_one/mystic/archive/main.zip -O $MSTEMPDIR/dbp-main.zip &>$INSTALLLOG
cmd_exec rm -rf $MSTEMPDIR/mystic &>$INSTALLLOG
cmd_exec pushd $MSTEMPDIR &>$INSTALLLOG
cmd_exec unzip dbp-main.zip &>$INSTALLLOG
cmd_exec popd &>$INSTALLLOG
msg_ok "Downloading ${APP} Mystic BBS Disconnected-by-Peer Installer Files"
#==============================================================================================================
@ -272,7 +272,7 @@ echo "when you switched to the ${MYSTIC_DIR}" >> ${DBP_INFO}
echo "" >> ${DBP_INFO}
echo "==============================================================================================================" >> ${DBP_INFO}
chown mystic:mystic -R ${MYSTIC_DIR} &>/dev/null
cmd_exec chown mystic:mystic -R ${MYSTIC_DIR} &>$INSTALLLOG
cat ${DBP_INFO}
echo "These Infos are also been put into ${DBP_INFO}"