Small corrections
This commit is contained in:
parent
1554196958
commit
a9a657ae1c
78
install.sh
78
install.sh
@ -43,6 +43,18 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${CODENAME}" = "bullseye" ]; then
|
||||
DIST="focal"
|
||||
elif [ "${CODENAME}" = "buster" ]; then
|
||||
DIST="bionic"
|
||||
elif [ "${CODENAME}" = "stretch" ]; then
|
||||
DIST="xenial"
|
||||
else
|
||||
DIST="${CODENAME}"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
MRC_VER="129a"
|
||||
|
||||
hostname="$(hostname)"
|
||||
@ -183,8 +195,8 @@ if [ $exitstatus = 0 ]; then
|
||||
fi
|
||||
|
||||
BANUNBAN=$(whiptail --title "Add Ban / Anban to Mystic" --radiolist --cancel-button Exit-Script "Choose Fail2Ban IpBan No" 12 58 5 \
|
||||
"fail2ban" "Add Fail2Ban" FAIL2BAN \
|
||||
"ipban" "Add IpBan" IPBAN \
|
||||
"fail2ban" "Add Fail2Ban" ON \
|
||||
"ipban" "Add IpBan" OFF \
|
||||
"No" "Don't add IP Banning" OFF \
|
||||
3>&1 1>&2 2>&3)
|
||||
exitstatus=$?
|
||||
@ -192,6 +204,15 @@ if [ $exitstatus = 0 ]; then
|
||||
echo -e "${DGN}Add Fail2Ban: ${BGN}$BANUNBAN${CL}"
|
||||
fi
|
||||
|
||||
DOSEMU=$(whiptail --title "Add DosEmu2 to Mystic" --radiolist --cancel-button Exit-Script "Choose Yes No" 8 58 2 \
|
||||
"Yes" "Add DosEmu2 Script" ON \
|
||||
"No" "Don't add DosEmu2 Script" OFF \
|
||||
3>&1 1>&2 2>&3)
|
||||
exitstatus=$?
|
||||
if [ $exitstatus = 0 ]; then
|
||||
echo -e "${DGN}Add DbP Script: ${BGN}$DOSEMU${CL}"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#==============================================================================================================
|
||||
@ -301,18 +322,24 @@ 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
|
||||
wget -N http://www.mysticbbs.com/downloads/cl3431.zip -O /usr/local/src/mystic/cryptlib3431.zip &>/dev/null
|
||||
rm -rf /usr/local/src/mystic/cryptlib-3.4.3.1 &>/dev/null
|
||||
mkdir -p /usr/local/src/mystic/cryptlib-3.4.3.1 &>/dev/null
|
||||
pushd /usr/local/src/mystic/cryptlib-3.4.3.1 &>/dev/null
|
||||
unzip ../cryptlib3431.zip &>/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
|
||||
pushd /usr/local/src/mystic/cryptlib-3.4.5 &>/dev/null
|
||||
unzip ../cryptlib345.zip &>/dev/null
|
||||
dos2unix tools/* &>/dev/null
|
||||
patch -p1 -i /usr/local/src/mystic/mystic/cryptlib/gccversion-3431.patch &>/dev/null
|
||||
patch -p1 -i /usr/local/src/mystic/mystic/cryptlib/gccversion-345.patch &>/dev/null
|
||||
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
|
||||
cp libcl.so.3.4.3 ${LIBDIR}/ &>/dev/null
|
||||
ln -sf libcl.so.3.4.3 ${LIBDIR}/libcl.so.3.4 &>/dev/null
|
||||
apt-get purge -y gcc g++ cpp &>/dev/null
|
||||
apt-get 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
|
||||
ln -sf libcl.so.3 ${LIBDIR}/libcl.so &>/dev/null
|
||||
popd &>/dev/null
|
||||
@ -370,8 +397,6 @@ if [ -z "${FAIL2BAN_GROUP}" ]; then
|
||||
groupadd fail2ban &>/dev/null
|
||||
fi
|
||||
usermod --append --groups fail2ban mystic &>/dev/null
|
||||
chown root:fail2ban /var/run/fail2ban/fail2ban.sock &>/dev/null
|
||||
chmod g+w /var/run/fail2ban/fail2ban.sock &>/dev/null
|
||||
msg_ok "Installing Fail2Ban Dependencies for ${APP}"
|
||||
|
||||
msg_info "Installing Fail2Ban Scripts for ${APP}"
|
||||
@ -402,6 +427,7 @@ fi
|
||||
usermod --append --groups ipban mystic &>/dev/null
|
||||
chown -R root:ipban /opt/ipban &>/dev/null
|
||||
chmod 775 /opt/ipban/ &>/dev/null
|
||||
dos2unix /opt/ipban/*.{config,xml,md} &>/dev/null
|
||||
popd &>/dev/null
|
||||
msg_ok "Installing IpBan Dependencies for ${APP}"
|
||||
|
||||
@ -415,6 +441,34 @@ fi
|
||||
|
||||
#==============================================================================================================
|
||||
|
||||
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
|
||||
|
||||
#rm -rf /usr/local/src/mystic/IniMod_linux${INIMOD_ARCH} &>/dev/null
|
||||
#mkdir -p /usr/local/src/mystic/IniMod_linux${INIMOD_ARCH} &>/dev/null
|
||||
#pushd /usr/local/src/mystic/IniMod_linux${INIMOD_ARCH} &>/dev/null
|
||||
#unzip ../IniMod_linux${INIMOD_ARCH}.zip &>/dev/null
|
||||
#cp inimod ${MYSTIC_DIR}
|
||||
#chmod +x ${MYSTIC_DIR}/inimod
|
||||
#cp README.txt ${MYSTIC_DIR}/docs/inimod_README.txt
|
||||
#popd &>/dev/null
|
||||
msg_ok "Installing DosEmu2 Dependencies for ${APP}"
|
||||
|
||||
#msg_info "Installing DbP Cron/banip/unbanip Scripts"
|
||||
#pushd /usr/local/src/mystic/mystic/dbp &>/dev/null
|
||||
#bash install.sh $MYSTIC_DIR &>/dev/null
|
||||
#popd &>/dev/null
|
||||
#msg_ok "Installing DbP Cron/banip/unbanip Scripts"
|
||||
|
||||
fi
|
||||
|
||||
#==============================================================================================================
|
||||
|
||||
sed -e 's/\\/\//g' -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e "s!c:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e "s!d:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mutil.ini
|
||||
|
Loading…
Reference in New Issue
Block a user