update script for newer apt tools

This commit is contained in:
Mario Fetka 2024-04-14 09:59:27 +02:00
parent a60e146967
commit ebc4eb53e9
2 changed files with 55 additions and 53 deletions

View File

@ -51,6 +51,8 @@ else
fi
if [ "${CODENAME}" = "bullseye" ]; then
DIST="kinetic"
elif [ "${CODENAME}" = "bullseye" ]; then
DIST="focal"
elif [ "${CODENAME}" = "buster" ]; then
DIST="bionic"
@ -122,8 +124,8 @@ function msg_ok() {
}
msg_info "Setting up ${APP} Repository"
apt-get update &>/dev/null
apt-get install -y software-properties-common &>/dev/null
apt update &>/dev/null
apt install -y software-properties-common &>/dev/null
if [ "${DIST}" = "Debian" ]; then
apt-add-repository contrib &>/dev/null
apt-add-repository non-free &>/dev/null
@ -133,10 +135,10 @@ if [ "${DIST}" = "Ubuntu" ]; then
apt-add-repository restricted &>/dev/null
apt-add-repository multiverse &>/dev/null
fi
apt-get update &>/dev/null
apt-get install -y curl &>/dev/null
apt-get install -y wget &>/dev/null
apt-get install -y gnupg &>/dev/null
apt update &>/dev/null
apt install -y curl &>/dev/null
apt install -y wget &>/dev/null
apt install -y gnupg &>/dev/null
mkdir -p /usr/local/src/mystic &>/dev/null
msg_ok "Setup ${APP} Repository"
@ -185,7 +187,7 @@ fi
IP2L=$(whiptail --title "Add The IP2Location Download Client to Mystic" --radiolist --cancel-button Exit-Script "Choose Yes No" 8 58 2 \
"Yes" "Add IP2Location Download Client" ON \
"No" "Don't Add IP2Location Download Client" OFF \
"No" "Don't Add IP2Location Download Client" OFF \
3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
@ -225,7 +227,7 @@ fi
#==============================================================================================================
msg_info "Starting ${APP} Installation !!!! Plz set Installation dir the same as bevor !!!"
apt-get install -y unrar-free python3 python2 &>/dev/null
apt install -y unrar-free python3 python2 &>/dev/null
wget -N http://www.mysticbbs.com/downloads/mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} -O /usr/local/src/mystic/mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} &>/dev/null
rm -rf /usr/local/src/mystic/mystic-${MYSTIC_VER} &>/dev/null
mkdir -p /usr/local/src/mystic/mystic-${MYSTIC_VER} &>/dev/null
@ -284,7 +286,7 @@ msg_ok "Creating ${APP} und setting Permissions in ${MYSTIC_DIR}"
if [ $SPELL = "Yes" ]; then
msg_info "Setting up Spellcheck for ${APP}"
apt-get install -y libhunspell-dev &>/dev/null
apt install -y libhunspell-dev &>/dev/null
wget -N http://www.mysticbbs.com/downloads/mystic_spellcheck_v2.zip -O /usr/local/src/mystic/mystic_spellcheck_v2.zip &>/dev/null
rm -rf /usr/local/src/mystic/mystic_spellcheck_v2 &>/dev/null
mkdir -p /usr/local/src/mystic/mystic_spellcheck_v2 &>/dev/null
@ -303,7 +305,7 @@ fi
if [ $MRC = "Yes" ]; then
msg_info "Setting up Multi Relay Chat for ${APP}"
apt-get install -y build-essential &>/dev/null
apt install -y build-essential &>/dev/null
wget -N https://www.phenomprod.com/releases/mystic/pn-mrc${MRC_VER}.zip -O /usr/local/src/mystic/pn-mrc${MRC_VER}.zip &>/dev/null
rm -rf /usr/local/src/mystic/pn-mrc${MRC_VER} &>/dev/null
mkdir -p /usr/local/src/mystic/pn-mrc${MRC_VER} &>/dev/null
@ -328,10 +330,10 @@ fi
if [ $CRYPT = "Yes" ]; then
msg_info "Setting up ${APP} cryptlib for ssh/ssl (be patient compiling cryptlib)"
apt-get install -y build-essential &>/dev/null
apt-get install -y gcc-9 g++-9 cpp-9 gcc g++ cpp &>/dev/null
apt-get install -y patch &>/dev/null
apt-get install -y dos2unix &>/dev/null
apt install -y build-essential &>/dev/null
apt install -y gcc-9 g++-9 cpp-9 gcc g++ cpp &>/dev/null
apt install -y patch &>/dev/null
apt install -y dos2unix &>/dev/null
wget -N http://www.mysticbbs.com/downloads/cl345.zip -O /usr/local/src/mystic/cryptlib345.zip &>/dev/null
rm -rf /usr/local/src/mystic/cryptlib-3.4.5 &>/dev/null
mkdir -p /usr/local/src/mystic/cryptlib-3.4.5 &>/dev/null
@ -343,8 +345,8 @@ ln -sf gcc-9 /usr/bin/gcc &>/dev/null
ln -sf g++-9 /usr/bin/g++ &>/dev/null
ln -sf cpp-9 /usr/bin/cpp &>/dev/null
make shared &>/dev/null
apt-get purge -y gcc g++ cpp &>/dev/null
apt-get install -y gcc g++ cpp &>/dev/null
apt purge -y gcc g++ cpp &>/dev/null
apt install -y gcc g++ cpp &>/dev/null
cp libcl.so.3.4.5 ${LIBDIR}/ &>/dev/null
ln -sf libcl.so.3.4.5 ${LIBDIR}/libcl.so.3.4 &>/dev/null
ln -sf libcl.so.3.4 ${LIBDIR}/libcl.so.3 &>/dev/null
@ -357,7 +359,7 @@ fi
if [ $IP2L = "Yes" ]; then
msg_info "Setting up IP2Location Download Client for ${APP}"
apt-get install -y libwww-perl &>/dev/null
apt install -y libwww-perl &>/dev/null
wget -N https://www.ip2location.com/downloads/ip2location-downloader-linux.zip -O /usr/local/src/mystic/ip2location-downloader-linux.zip &>/dev/null
rm -rf /usr/local/src/mystic/ip2location-downloader-linux &>/dev/null
mkdir -p /usr/local/src/mystic/ip2location-downloader-linux &>/dev/null
@ -397,9 +399,9 @@ fi
if [ $BANUNBAN = "fail2ban" ]; then
msg_info "Installing Fail2Ban Dependencies for ${APP}"
apt-get install -y fail2ban &>/dev/null
apt-get install -y iptables &>/dev/null
apt-get install -y ipset &>/dev/null
apt install -y fail2ban &>/dev/null
apt install -y iptables &>/dev/null
apt install -y ipset &>/dev/null
if [ -z "${FAIL2BAN_GROUP}" ]; then
groupadd fail2ban &>/dev/null
fi
@ -418,10 +420,10 @@ if [ $BANUNBAN = "ipban" ]; then
msg_info "Installing IpBan Dependencies for ${APP}"
pushd /usr/local/src/mystic &>/dev/null
wget -N https://github.com/DigitalRuby/IPBan/raw/master/IPBanCore/Linux/Scripts/Install.sh -O /usr/local/src/mystic/ipban-install.sh &>/dev/null
apt-get install -y fail2ban &>/dev/null
apt-get install -y iptables &>/dev/null
apt-get install -y ipset &>/dev/null
apt-get install -y xmlstarlet &>/dev/null
apt install -y fail2ban &>/dev/null
apt install -y iptables &>/dev/null
apt install -y ipset &>/dev/null
apt install -y xmlstarlet &>/dev/null
sed -i '/yum/d' /usr/local/src/mystic/ipban-install.sh &>/dev/null
sed -i '/systemctl/d' /usr/local/src/mystic/ipban-install.sh &>/dev/null
sed -e 's!sudo !!g' -i /usr/local/src/mystic/ipban-install.sh &>/dev/null
@ -452,9 +454,9 @@ if [ $DOSEMU = "Yes" ]; then
msg_info "Installing DosEmu2 Dependencies for ${APP}"
pushd /usr/local/src/mystic &>/dev/null
echo "deb [trusted=yes] https://ppa.launchpadcontent.net/dosemu2/ppa/ubuntu $DIST main" | tee /etc/apt/sources.list.d/dosemu2.list &>/dev/null
apt-get update &>/dev/null
apt-get install -y dosemu2 &>/dev/null
apt-get install -y install-otherdos &>/dev/null
apt update &>/dev/null
apt install -y dosemu2 &>/dev/null
apt install -y install-otherdos &>/dev/null
#rm -rf /usr/local/src/mystic/IniMod_linux${INIMOD_ARCH} &>/dev/null
#mkdir -p /usr/local/src/mystic/IniMod_linux${INIMOD_ARCH} &>/dev/null

View File

@ -124,8 +124,8 @@ function msg_ok() {
}
msg_info "Setting up ${APP} Repository"
apt-get update &>/dev/null
apt-get install -y software-properties-common &>/dev/null
apt update &>/dev/null
apt install -y software-properties-common &>/dev/null
if [ "${DIST}" = "Debian" ]; then
apt-add-repository contrib &>/dev/null
apt-add-repository non-free &>/dev/null
@ -135,10 +135,10 @@ if [ "${DIST}" = "Ubuntu" ]; then
apt-add-repository restricted &>/dev/null
apt-add-repository multiverse &>/dev/null
fi
apt-get update &>/dev/null
apt-get install -y curl &>/dev/null
apt-get install -y wget &>/dev/null
apt-get install -y gnupg &>/dev/null
apt update &>/dev/null
apt install -y curl &>/dev/null
apt install -y wget &>/dev/null
apt install -y gnupg &>/dev/null
mkdir -p /usr/local/src/mystic &>/dev/null
msg_ok "Setup ${APP} Repository"
@ -227,7 +227,7 @@ fi
#==============================================================================================================
msg_info "Starting ${APP} Installation !!!! Plz set Installation dir the same as bevor !!!"
apt-get install -y unrar-free python3 python2 &>/dev/null
apt install -y unrar-free python3 python2 &>/dev/null
wget -N http://www.mysticbbs.com/downloads/mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} -O /usr/local/src/mystic/mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} &>/dev/null
rm -rf /usr/local/src/mystic/mystic-${MYSTIC_VER} &>/dev/null
mkdir -p /usr/local/src/mystic/mystic-${MYSTIC_VER} &>/dev/null
@ -286,7 +286,7 @@ msg_ok "Creating ${APP} und setting Permissions in ${MYSTIC_DIR}"
if [ $SPELL = "Yes" ]; then
msg_info "Setting up Spellcheck for ${APP}"
apt-get install -y libhunspell-dev &>/dev/null
apt install -y libhunspell-dev &>/dev/null
wget -N http://www.mysticbbs.com/downloads/mystic_spellcheck_v2.zip -O /usr/local/src/mystic/mystic_spellcheck_v2.zip &>/dev/null
rm -rf /usr/local/src/mystic/mystic_spellcheck_v2 &>/dev/null
mkdir -p /usr/local/src/mystic/mystic_spellcheck_v2 &>/dev/null
@ -305,7 +305,7 @@ fi
if [ $MRC = "Yes" ]; then
msg_info "Setting up Multi Relay Chat for ${APP}"
apt-get install -y build-essential &>/dev/null
apt install -y build-essential &>/dev/null
wget -N https://www.phenomprod.com/releases/mystic/pn-mrc${MRC_VER}.zip -O /usr/local/src/mystic/pn-mrc${MRC_VER}.zip &>/dev/null
rm -rf /usr/local/src/mystic/pn-mrc${MRC_VER} &>/dev/null
mkdir -p /usr/local/src/mystic/pn-mrc${MRC_VER} &>/dev/null
@ -330,10 +330,10 @@ fi
if [ $CRYPT = "Yes" ]; then
msg_info "Setting up ${APP} cryptlib for ssh/ssl (be patient compiling cryptlib)"
apt-get install -y build-essential &>/dev/null
apt-get install -y gcc-9 g++-9 cpp-9 gcc g++ cpp &>/dev/null
apt-get install -y patch &>/dev/null
apt-get install -y dos2unix &>/dev/null
apt install -y build-essential &>/dev/null
apt install -y gcc-9 g++-9 cpp-9 gcc g++ cpp &>/dev/null
apt install -y patch &>/dev/null
apt install -y dos2unix &>/dev/null
wget -N http://www.mysticbbs.com/downloads/cl345.zip -O /usr/local/src/mystic/cryptlib345.zip &>/dev/null
rm -rf /usr/local/src/mystic/cryptlib-3.4.5 &>/dev/null
mkdir -p /usr/local/src/mystic/cryptlib-3.4.5 &>/dev/null
@ -345,8 +345,8 @@ ln -sf gcc-9 /usr/bin/gcc &>/dev/null
ln -sf g++-9 /usr/bin/g++ &>/dev/null
ln -sf cpp-9 /usr/bin/cpp &>/dev/null
make shared &>/dev/null
apt-get purge -y gcc g++ cpp &>/dev/null
apt-get install -y gcc g++ cpp &>/dev/null
apt purge -y gcc g++ cpp &>/dev/null
apt install -y gcc g++ cpp &>/dev/null
cp libcl.so.3.4.5 ${LIBDIR}/ &>/dev/null
ln -sf libcl.so.3.4.5 ${LIBDIR}/libcl.so.3.4 &>/dev/null
ln -sf libcl.so.3.4 ${LIBDIR}/libcl.so.3 &>/dev/null
@ -359,7 +359,7 @@ fi
if [ $IP2L = "Yes" ]; then
msg_info "Setting up IP2Location Download Client for ${APP}"
apt-get install -y libwww-perl &>/dev/null
apt install -y libwww-perl &>/dev/null
wget -N https://www.ip2location.com/downloads/ip2location-downloader-linux.zip -O /usr/local/src/mystic/ip2location-downloader-linux.zip &>/dev/null
rm -rf /usr/local/src/mystic/ip2location-downloader-linux &>/dev/null
mkdir -p /usr/local/src/mystic/ip2location-downloader-linux &>/dev/null
@ -399,9 +399,9 @@ fi
if [ $BANUNBAN = "fail2ban" ]; then
msg_info "Installing Fail2Ban Dependencies for ${APP}"
apt-get install -y fail2ban &>/dev/null
apt-get install -y iptables &>/dev/null
apt-get install -y ipset &>/dev/null
apt install -y fail2ban &>/dev/null
apt install -y iptables &>/dev/null
apt install -y ipset &>/dev/null
if [ -z "${FAIL2BAN_GROUP}" ]; then
groupadd fail2ban &>/dev/null
fi
@ -420,10 +420,10 @@ if [ $BANUNBAN = "ipban" ]; then
msg_info "Installing IpBan Dependencies for ${APP}"
pushd /usr/local/src/mystic &>/dev/null
wget -N https://github.com/DigitalRuby/IPBan/raw/master/IPBanCore/Linux/Scripts/Install.sh -O /usr/local/src/mystic/ipban-install.sh &>/dev/null
apt-get install -y fail2ban &>/dev/null
apt-get install -y iptables &>/dev/null
apt-get install -y ipset &>/dev/null
apt-get install -y xmlstarlet &>/dev/null
apt install -y fail2ban &>/dev/null
apt install -y iptables &>/dev/null
apt install -y ipset &>/dev/null
apt install -y xmlstarlet &>/dev/null
sed -i '/yum/d' /usr/local/src/mystic/ipban-install.sh &>/dev/null
sed -i '/systemctl/d' /usr/local/src/mystic/ipban-install.sh &>/dev/null
sed -e 's!sudo !!g' -i /usr/local/src/mystic/ipban-install.sh &>/dev/null
@ -454,9 +454,9 @@ if [ $DOSEMU = "Yes" ]; then
msg_info "Installing DosEmu2 Dependencies for ${APP}"
pushd /usr/local/src/mystic &>/dev/null
echo "deb [trusted=yes] https://ppa.launchpadcontent.net/dosemu2/ppa/ubuntu $DIST main" | tee /etc/apt/sources.list.d/dosemu2.list &>/dev/null
apt-get update &>/dev/null
apt-get install -y dosemu2 &>/dev/null
apt-get install -y install-otherdos &>/dev/null
apt update &>/dev/null
apt install -y dosemu2 &>/dev/null
apt install -y install-otherdos &>/dev/null
#rm -rf /usr/local/src/mystic/IniMod_linux${INIMOD_ARCH} &>/dev/null
#mkdir -p /usr/local/src/mystic/IniMod_linux${INIMOD_ARCH} &>/dev/null