|
|
@ -9,16 +9,11 @@ CL=$(echo "\033[m")
|
|
|
|
BFR="\\r\\033[K"
|
|
|
|
BFR="\\r\\033[K"
|
|
|
|
HOLD="-"
|
|
|
|
HOLD="-"
|
|
|
|
CM="${GN}✓${CL}"
|
|
|
|
CM="${GN}✓${CL}"
|
|
|
|
APP="Mystic"
|
|
|
|
APP="Mystic BBS"
|
|
|
|
MSDIR="/opt/mystic"
|
|
|
|
MSDIR="/opt/mystic"
|
|
|
|
|
|
|
|
MSTEMPDIR="/usr/local/src/mystic"
|
|
|
|
TMP_DIR=$(mktemp -d)
|
|
|
|
TMP_DIR=$(mktemp -d)
|
|
|
|
|
|
|
|
SCRIPT_VER="v1"
|
|
|
|
apt install lsb-release dpkg-dev wget curl -y &>/dev/null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DIST=$(lsb_release -i -s)
|
|
|
|
|
|
|
|
CODENAME=$(lsb_release -c -s)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GROUP=$(getent group mystic)
|
|
|
|
GROUP=$(getent group mystic)
|
|
|
|
USER=$(getent shadow mystic)
|
|
|
|
USER=$(getent shadow mystic)
|
|
|
@ -26,9 +21,62 @@ USER=$(getent shadow mystic)
|
|
|
|
FAIL2BAN_GROUP=$(getent group fail2ban)
|
|
|
|
FAIL2BAN_GROUP=$(getent group fail2ban)
|
|
|
|
IPBAN_GROUP=$(getent group ipban)
|
|
|
|
IPBAN_GROUP=$(getent group ipban)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hostname="$(hostname)"
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
|
|
|
|
set -o errtrace
|
|
|
|
|
|
|
|
set -o nounset
|
|
|
|
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
shopt -s expand_aliases
|
|
|
|
|
|
|
|
alias die='EXIT=$? LINE=$LINENO error_exit'
|
|
|
|
|
|
|
|
trap die ERR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function error_exit() {
|
|
|
|
|
|
|
|
trap - ERR
|
|
|
|
|
|
|
|
local reason="Unknown failure occured."
|
|
|
|
|
|
|
|
local msg="${1:-$reason}"
|
|
|
|
|
|
|
|
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
|
|
|
|
|
|
|
|
echo -e "$flag $msg" 1>&2
|
|
|
|
|
|
|
|
exit $EXIT
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
|
|
|
|
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
|
|
|
|
|
|
|
|
case $yn in
|
|
|
|
|
|
|
|
[Yy]*) break ;;
|
|
|
|
|
|
|
|
[Nn]*) exit ;;
|
|
|
|
|
|
|
|
*) echo "Please answer yes or no." ;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
clear
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function msg_info() {
|
|
|
|
|
|
|
|
local msg="$1"
|
|
|
|
|
|
|
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function msg_ok() {
|
|
|
|
|
|
|
|
local msg="$1"
|
|
|
|
|
|
|
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Installing needed base packages"
|
|
|
|
|
|
|
|
apt update &>/dev/null
|
|
|
|
|
|
|
|
apt install lsb-release dpkg-dev wget curl figlet lolcat unzip -y &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Installing needed base packages"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function header_info {
|
|
|
|
|
|
|
|
/usr/bin/env figlet -w 60 -c "Mystic BBS DbP Installer" | /usr/games/lolcat -f
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
header_info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DIST=$(lsb_release -i -s)
|
|
|
|
|
|
|
|
CODENAME=$(lsb_release -c -s)
|
|
|
|
|
|
|
|
|
|
|
|
LIBDIR=/usr/lib/${ARCH}
|
|
|
|
LIBDIR=/usr/lib/${ARCH}
|
|
|
|
MYSTIC_VER="112a48"
|
|
|
|
|
|
|
|
SCRIPT_VER="v0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${ARCH}" = "x86_64-linux-gnu" ]; then
|
|
|
|
if [ "${ARCH}" = "x86_64-linux-gnu" ]; then
|
|
|
|
INIMOD_ARCH="amd64"
|
|
|
|
INIMOD_ARCH="amd64"
|
|
|
@ -52,575 +100,152 @@ else
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${CODENAME}" = "bookworm" ]; then
|
|
|
|
if [ "${CODENAME}" = "bookworm" ]; then
|
|
|
|
DIST="kinetic"
|
|
|
|
UBUNTU="kinetic"
|
|
|
|
elif [ "${CODENAME}" = "bullseye" ]; then
|
|
|
|
elif [ "${CODENAME}" = "bullseye" ]; then
|
|
|
|
DIST="focal"
|
|
|
|
UBUNTU="focal"
|
|
|
|
elif [ "${CODENAME}" = "buster" ]; then
|
|
|
|
elif [ "${CODENAME}" = "buster" ]; then
|
|
|
|
DIST="bionic"
|
|
|
|
UBUNTU="bionic"
|
|
|
|
elif [ "${CODENAME}" = "stretch" ]; then
|
|
|
|
elif [ "${CODENAME}" = "stretch" ]; then
|
|
|
|
DIST="xenial"
|
|
|
|
UBUNTU="xenial"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
DIST="${CODENAME}"
|
|
|
|
UBUNTU="${CODENAME}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MRC_VER="129a"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hostname="$(hostname)"
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
|
|
|
|
set -o errtrace
|
|
|
|
|
|
|
|
set -o nounset
|
|
|
|
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
shopt -s expand_aliases
|
|
|
|
|
|
|
|
alias die='EXIT=$? LINE=$LINENO error_exit'
|
|
|
|
|
|
|
|
trap die ERR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function error_exit() {
|
|
|
|
|
|
|
|
trap - ERR
|
|
|
|
|
|
|
|
local reason="Unknown failure occured."
|
|
|
|
|
|
|
|
local msg="${1:-$reason}"
|
|
|
|
|
|
|
|
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
|
|
|
|
|
|
|
|
echo -e "$flag $msg" 1>&2
|
|
|
|
|
|
|
|
exit $EXIT
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
|
|
|
|
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
|
|
|
|
|
|
|
|
case $yn in
|
|
|
|
|
|
|
|
[Yy]*) break ;;
|
|
|
|
|
|
|
|
[Nn]*) exit ;;
|
|
|
|
|
|
|
|
*) echo "Please answer yes or no." ;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
clear
|
|
|
|
|
|
|
|
function header_info {
|
|
|
|
|
|
|
|
echo -e "${BL}
|
|
|
|
|
|
|
|
__ __ _ _ ____ ____ _____
|
|
|
|
|
|
|
|
| \/ | | | (_) | _ \| _ \ / ____|
|
|
|
|
|
|
|
|
| \ / |_ _ ___| |_ _ ___ | |_) | |_) | (___
|
|
|
|
|
|
|
|
| |\/| | | | / __| __| |/ __| | _ <| _ < \___ \
|
|
|
|
|
|
|
|
| | | | |_| \__ \ |_| | (__ | |_) | |_) |____) |
|
|
|
|
|
|
|
|
|_| |_|\__, |___/\__|_|\___| |____/|____/|_____/
|
|
|
|
|
|
|
|
__/ |
|
|
|
|
|
|
|
|
_____ _ |___/ _____ _ _ _
|
|
|
|
|
|
|
|
| __ \| | | __ \ |_ _| | | | | |
|
|
|
|
|
|
|
|
| | | | |__ | |__) | | | _ __ ___| |_ __ _| | | ___ _ __
|
|
|
|
|
|
|
|
| | | | '_ \| ___/ | | | '_ \/ __| __/ _ | | |/ _ \ __|
|
|
|
|
|
|
|
|
| |__| | |_) | | _| |_| | | \__ \ || (_| | | | __/ |
|
|
|
|
|
|
|
|
|_____/|_ __/|_| |_____|_| |_|___/\__\__ _|_|_|\___|_|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${CL}"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
header_info
|
|
|
|
|
|
|
|
function msg_info() {
|
|
|
|
|
|
|
|
local msg="$1"
|
|
|
|
|
|
|
|
echo -ne " ${HOLD} ${YW}${msg}..."
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function msg_ok() {
|
|
|
|
|
|
|
|
local msg="$1"
|
|
|
|
|
|
|
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Setting up ${APP} Repository"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${DIST}" = "Ubuntu" ]; then
|
|
|
|
|
|
|
|
apt-add-repository universe &>/dev/null
|
|
|
|
|
|
|
|
apt-add-repository restricted &>/dev/null
|
|
|
|
|
|
|
|
apt-add-repository multiverse &>/dev/null
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MSAPPDIR=$(whiptail --inputbox "Mystic Install Directory that also must be set in the Mystic insallation Programm." 8 58 $MSDIR --title "Install Directory" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
exitstatus=$?
|
|
|
|
|
|
|
|
if [ -z $MSAPPDIR ]; then
|
|
|
|
|
|
|
|
MYSTIC_DIR="$MSDIR"
|
|
|
|
|
|
|
|
echo -e "${DGN}Installing Mystic to: ${BGN}$MYSTIC_DIR${CL}"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
if [ $exitstatus = 0 ]; then
|
|
|
|
|
|
|
|
MYSTIC_DIR="$MSAPPDIR"
|
|
|
|
|
|
|
|
echo -e "${DGN}Installing Mystic to: ${BGN}$MYSTIC_DIR${CL}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MUTIL_DIR=${MYSTIC_DIR}/mutil.d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CRYPT=$(whiptail --title "SSL SSH Support in Mystic" --radiolist --cancel-button Exit-Script "Choose Yes No" 8 58 2 \
|
|
|
|
|
|
|
|
"Yes" "Add ssl Support" ON \
|
|
|
|
|
|
|
|
"No" "Don't add ssl Support" OFF \
|
|
|
|
|
|
|
|
3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
exitstatus=$?
|
|
|
|
|
|
|
|
if [ $exitstatus = 0 ]; then
|
|
|
|
|
|
|
|
echo -e "${DGN}Add ssl Support: ${BGN}$CRYPT${CL}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SPELL=$(whiptail --title "Spellcheck Support in Mystic" --radiolist --cancel-button Exit-Script "Choose Yes No" 8 58 2 \
|
|
|
|
|
|
|
|
"Yes" "Add Spellcheck Support" ON \
|
|
|
|
|
|
|
|
"No" "Don't add Spellcheck Support" OFF \
|
|
|
|
|
|
|
|
3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
exitstatus=$?
|
|
|
|
|
|
|
|
if [ $exitstatus = 0 ]; then
|
|
|
|
|
|
|
|
echo -e "${DGN}Add Spellcheck Support: ${BGN}$SPELL${CL}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MRC=$(whiptail --title "Multi Relay Chat Support in Mystic" --radiolist --cancel-button Exit-Script "Choose Yes No" 8 58 2 \
|
|
|
|
|
|
|
|
"Yes" "Add MrC Support" ON \
|
|
|
|
|
|
|
|
"No" "Don't add MrC Support" OFF \
|
|
|
|
|
|
|
|
3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
exitstatus=$?
|
|
|
|
|
|
|
|
if [ $exitstatus = 0 ]; then
|
|
|
|
|
|
|
|
echo -e "${DGN}Add Multi Realy Chat Support: ${BGN}$MRC${CL}"
|
|
|
|
|
|
|
|
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 \
|
|
|
|
|
|
|
|
3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
exitstatus=$?
|
|
|
|
|
|
|
|
if [ $exitstatus = 0 ]; then
|
|
|
|
|
|
|
|
echo -e "${DGN}Add DbP Script: ${BGN}$IP2L${CL}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DBPSCRIPTS=$(whiptail --title "Add The Disconnected by Peer Script to Mystic" --radiolist --cancel-button Exit-Script "Choose Yes No" 8 58 2 \
|
|
|
|
|
|
|
|
"Yes" "Add DbP Script" ON \
|
|
|
|
|
|
|
|
"No" "Don't add DbP Script" OFF \
|
|
|
|
|
|
|
|
3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
exitstatus=$?
|
|
|
|
|
|
|
|
if [ $exitstatus = 0 ]; then
|
|
|
|
|
|
|
|
echo -e "${DGN}Add DbP Script: ${BGN}$DBPSCRIPTS${CL}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BANUNBAN=$(whiptail --title "Add Ban / Anban to Mystic" --radiolist --cancel-button Exit-Script "Choose Fail2Ban IpBan No" 12 58 5 \
|
|
|
|
|
|
|
|
"fail2ban" "Add Fail2Ban" ON \
|
|
|
|
|
|
|
|
"ipban" "Add IpBan" OFF \
|
|
|
|
|
|
|
|
"No" "Don't add IP Banning" OFF \
|
|
|
|
|
|
|
|
3>&1 1>&2 2>&3)
|
|
|
|
|
|
|
|
exitstatus=$?
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${CODENAME}" = "bookworm" ]; then
|
|
|
|
if [ "${CODENAME}" = "bookworm" ]; then
|
|
|
|
msg_info "adding bullseye repository to bookworm for python2"
|
|
|
|
msg_info "adding bullseye repository to bookworm for python2"
|
|
|
|
echo "deb http://deb.debian.org/debian bullseye contrib non-free main" > /etc/apt/sources.list.d/bullseye.list
|
|
|
|
echo "deb http://deb.debian.org/debian bullseye contrib non-free main" > /etc/apt/sources.list.d/bullseye.list
|
|
|
|
echo "deb http://deb.debian.org/debian bullseye-updates contrib non-free main" >> /etc/apt/sources.list.d/bullseye.list
|
|
|
|
echo "deb http://deb.debian.org/debian bullseye-updates contrib non-free main" >> /etc/apt/sources.list.d/bullseye.list
|
|
|
|
echo "deb http://security.debian.org bullseye-security contrib non-free main" >> /etc/apt/sources.list.d/bullseye.list
|
|
|
|
echo "deb http://security.debian.org bullseye-security contrib non-free main" >> /etc/apt/sources.list.d/bullseye.list
|
|
|
|
|
|
|
|
msg_ok "adding bullseye repository to bookworm for python2"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "adding jessie lts repository for openssl 1.0"
|
|
|
|
|
|
|
|
wget https://deb.freexian.com/extended-lts/archive-key.gpg -O /etc/apt/trusted.gpg.d/freexian-archive-extended-lts.gpg &>/dev/null
|
|
|
|
|
|
|
|
echo "deb http://deb.freexian.com/extended-lts jessie main contrib non-free" > /etc/apt/sources.list.d/jessie-extended-lts.list
|
|
|
|
|
|
|
|
msg_ok "adding jessie lts repository for openssl 1.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Setting up ${APP} Repository"
|
|
|
|
|
|
|
|
apt install -y software-properties-common &>/dev/null
|
|
|
|
|
|
|
|
if [ "${DIST}" = "Debian" ]; then
|
|
|
|
|
|
|
|
apt-add-repository -y contrib &>/dev/null
|
|
|
|
|
|
|
|
apt-add-repository -y non-free &>/dev/null
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
fi
|
|
|
|
apt update &>/dev/null
|
|
|
|
apt update &>/dev/null
|
|
|
|
msg_ok "Finisched adding bullseye repository"
|
|
|
|
apt install -y curl wget gnupg unzip unrar &>/dev/null
|
|
|
|
fi
|
|
|
|
mkdir -p $MSTEMPDIR &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Setting up ${APP} Repository"
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Starting ${APP} Installation !!!! Plz set Installation dir the same as bevor !!!"
|
|
|
|
#==============================================================================================================
|
|
|
|
apt install -y unrar-free python3 python2 libpython2.7 &>/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
|
|
|
|
|
|
|
|
pushd /usr/local/src/mystic/mystic-${MYSTIC_VER} &>/dev/null
|
|
|
|
|
|
|
|
if [ "${MYSTIC_EXT}" = "rar" ]; then
|
|
|
|
|
|
|
|
unrar -x ../mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} &>/dev/null
|
|
|
|
|
|
|
|
elif [ "${MYSTIC_EXT}" = "zip" ]; then
|
|
|
|
|
|
|
|
unzip ../mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} &>/dev/null
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
chmod +x install &>/dev/null
|
|
|
|
|
|
|
|
./install
|
|
|
|
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Finisched ${APP} Installation"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Downloading ${APP} Systemd Start/Stop Scripts and Service File"
|
|
|
|
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 /usr/local/src/mystic/dbp-main.zip &>/dev/null
|
|
|
|
wget -N https://gitea.disconnected-by-peer.at/geos_one/mystic/archive/main.zip -O $MSTEMPDIR/dbp-main.zip &>/dev/null
|
|
|
|
rm -rf /usr/local/src/mystic/mystic &>/dev/null
|
|
|
|
rm -rf $MSTEMPDIR/mystic &>/dev/null
|
|
|
|
pushd /usr/local/src/mystic &>/dev/null
|
|
|
|
pushd $MSTEMPDIR &>/dev/null
|
|
|
|
unzip dbp-main.zip &>/dev/null
|
|
|
|
unzip dbp-main.zip &>/dev/null
|
|
|
|
popd &>/dev/null
|
|
|
|
popd &>/dev/null
|
|
|
|
msg_ok "Downloading ${APP} Systemd Start/Stop Scripts and Service File"
|
|
|
|
msg_ok "Downloading ${APP} Mystic BBS Disconnected-by-Peer Installer Files"
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Installing ${APP} Systemd Start/Stop Scripts and Service File"
|
|
|
|
|
|
|
|
pushd /usr/local/src/mystic/mystic/mystic &>/dev/null
|
|
|
|
|
|
|
|
bash install-${SCRIPT_VER}.sh $MYSTIC_DIR &>/dev/null
|
|
|
|
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Installing ${APP} Systemd Start/Stop Scripts and Service File"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Creating ${APP} und setting Permissions in ${MYSTIC_DIR}"
|
|
|
|
|
|
|
|
if [ -z "${GROUP}" ]; then
|
|
|
|
|
|
|
|
groupadd mystic &>/dev/null
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "${USER}" ]; then
|
|
|
|
|
|
|
|
useradd --home-dir ${MYSTIC_DIR} -g mystic mystic &>/dev/null
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
chown mystic:mystic -R ${MYSTIC_DIR} &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.txt' -type f -exec dos2unix {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.ini' -type f -exec dos2unix {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.txt' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.ini' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.dat' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.ans' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.asc' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.hlp' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.mnu' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.mnu' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.mps' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.mpx' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.mpy' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
find ${MYSTIC_DIR} -name '*.ms' -type f -exec chmod 0664 {} \; &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Creating ${APP} und setting Permissions in ${MYSTIC_DIR}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
if [ $SPELL = "Yes" ]; then
|
|
|
|
# Mystic install Directory
|
|
|
|
msg_info "Setting up Spellcheck for ${APP}"
|
|
|
|
source $MSTEMPDIR/mystic/mystic/prompt-${SCRIPT_VER}.sh
|
|
|
|
apt install -y libhunspell-dev &>/dev/null
|
|
|
|
# Add Cryptlib support
|
|
|
|
wget -N http://www.mysticbbs.com/downloads/mystic_spellcheck_v2.zip -O /usr/local/src/mystic/mystic_spellcheck_v2.zip &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/cryptlib/prompt-${SCRIPT_VER}.sh
|
|
|
|
rm -rf /usr/local/src/mystic/mystic_spellcheck_v2 &>/dev/null
|
|
|
|
# Add Spellcheck
|
|
|
|
mkdir -p /usr/local/src/mystic/mystic_spellcheck_v2 &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/spellcheck/prompt-${SCRIPT_VER}.sh
|
|
|
|
pushd /usr/local/src/mystic/mystic_spellcheck_v2 &>/dev/null
|
|
|
|
# Add Multi Relay Chat Client
|
|
|
|
unzip ../mystic_spellcheck_v2.zip &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/mrc-client/prompt-${SCRIPT_VER}.sh
|
|
|
|
cp dictionary.* ${MYSTIC_DIR}/data/
|
|
|
|
# Add Multi Relay Chat Server
|
|
|
|
cp wordlist.txt ${MYSTIC_DIR}/data/
|
|
|
|
source $MSTEMPDIR/mystic/mrc-server/prompt-${SCRIPT_VER}.sh
|
|
|
|
cp README.txt ${MYSTIC_DIR}/docs/Spellcheck_README.txt
|
|
|
|
# Add IP2Location
|
|
|
|
echo "; List secondary dicitinoaries in this File" > ${MYSTIC_DIR}/data/dictlist.txt
|
|
|
|
source $MSTEMPDIR/mystic/ip2location/prompt-${SCRIPT_VER}.sh
|
|
|
|
echo "; more details in the Spellcheck_README.txt" >> ${MYSTIC_DIR}/data/dictlist.txt
|
|
|
|
# Add DBP Scripts
|
|
|
|
popd &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/dbp/prompt-${SCRIPT_VER}.sh
|
|
|
|
msg_ok "Setting up Spellcheck for ${APP}"
|
|
|
|
# Add Fail2ban | banip
|
|
|
|
fi
|
|
|
|
source $MSTEMPDIR/mystic/fail2ban/prompt-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add Fail2ban | banip
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/dosemu2/prompt-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
if [ $MRC = "Yes" ]; then
|
|
|
|
# Mystic install
|
|
|
|
msg_info "Setting up Multi Relay Chat for ${APP}"
|
|
|
|
source $MSTEMPDIR/mystic/mystic/install-${SCRIPT_VER}.sh
|
|
|
|
apt install -y build-essential &>/dev/null
|
|
|
|
# Add Spellcheck
|
|
|
|
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
|
|
|
|
source $MSTEMPDIR/mystic/spellcheck/install-${SCRIPT_VER}.sh
|
|
|
|
rm -rf /usr/local/src/mystic/pn-mrc${MRC_VER} &>/dev/null
|
|
|
|
# Add Multi Relay Chat Client
|
|
|
|
mkdir -p /usr/local/src/mystic/pn-mrc${MRC_VER} &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/mrc-client/install-${SCRIPT_VER}.sh
|
|
|
|
pushd /usr/local/src/mystic/pn-mrc${MRC_VER} &>/dev/null
|
|
|
|
# Add Multi Relay Chat Server
|
|
|
|
unzip ../pn-mrc${MRC_VER}.zip &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/mrc-server/install-${SCRIPT_VER}.sh
|
|
|
|
cp mrc_${MRC_VER}/mrc_{client,config}.py ${MYSTIC_DIR}/
|
|
|
|
# Add Cryptlib support
|
|
|
|
cp mrc_${MRC_VER}/scripts/* ${MYSTIC_DIR}/themes/default/scripts/
|
|
|
|
source $MSTEMPDIR/mystic/cryptlib/install-${SCRIPT_VER}.sh
|
|
|
|
cp mrc_${MRC_VER}/text/* ${MYSTIC_DIR}/themes/default/text/
|
|
|
|
# Add IP2Location
|
|
|
|
cp installation.asc ${MYSTIC_DIR}/docs/mrc_installation.asc
|
|
|
|
source $MSTEMPDIR/mystic/ip2location/install-${SCRIPT_VER}.sh
|
|
|
|
popd &>/dev/null
|
|
|
|
# Add DBP Scripts
|
|
|
|
msg_ok "Setting up Multi Relay Chat for ${APP}"
|
|
|
|
source $MSTEMPDIR/mystic/dbp/install-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add Fail2ban | banip
|
|
|
|
msg_info "Installing Multi Relay Chat Systemd Start/Stop Scripts and Service File"
|
|
|
|
source $MSTEMPDIR/mystic/fail2ban/install-${SCRIPT_VER}.sh
|
|
|
|
pushd /usr/local/src/mystic/mystic/mrc-client &>/dev/null
|
|
|
|
# Add Fail2ban | banip
|
|
|
|
bash install-${SCRIPT_VER}.sh $MYSTIC_DIR &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/dosemu2/install-${SCRIPT_VER}.sh
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Installing Multi Relay Chat Systemd Start/Stop Scripts and Service File"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
if [ $CRYPT = "Yes" ]; then
|
|
|
|
# Mystic install
|
|
|
|
msg_info "Setting up ${APP} cryptlib for ssh/ssl (be patient compiling cryptlib)"
|
|
|
|
source $MSTEMPDIR/mystic/mystic/config-${SCRIPT_VER}.sh
|
|
|
|
apt install -y build-essential &>/dev/null
|
|
|
|
# Add Spellcheck
|
|
|
|
apt install -y gcc-9 g++-9 cpp-9 gcc g++ cpp &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/spellcheck/config-${SCRIPT_VER}.sh
|
|
|
|
apt install -y patch &>/dev/null
|
|
|
|
# Add Multi Relay Chat Client
|
|
|
|
apt install -y dos2unix &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/mrc-client/config-${SCRIPT_VER}.sh
|
|
|
|
wget -N http://www.mysticbbs.com/downloads/cl345.zip -O /usr/local/src/mystic/cryptlib345.zip &>/dev/null
|
|
|
|
# Add Multi Relay Chat Server
|
|
|
|
rm -rf /usr/local/src/mystic/cryptlib-3.4.5 &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/mrc-server/config-${SCRIPT_VER}.sh
|
|
|
|
mkdir -p /usr/local/src/mystic/cryptlib-3.4.5 &>/dev/null
|
|
|
|
# Add Cryptlib support
|
|
|
|
pushd /usr/local/src/mystic/cryptlib-3.4.5 &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/cryptlib/config-${SCRIPT_VER}.sh
|
|
|
|
unzip ../cryptlib345.zip &>/dev/null
|
|
|
|
# Add IP2Location
|
|
|
|
dos2unix tools/* &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/ip2location/config-${SCRIPT_VER}.sh
|
|
|
|
dos2unix kernel/* &>/dev/null
|
|
|
|
# Add DBP Scripts
|
|
|
|
patch -p1 -i /usr/local/src/mystic/mystic/cryptlib/patches/gccversion-345.patch &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/dbp/config-${SCRIPT_VER}.sh
|
|
|
|
patch -p0 -i /usr/local/src/mystic/mystic/cryptlib/patches/cl-linux-yield.patch &>/dev/null
|
|
|
|
# Add Fail2ban | banip
|
|
|
|
ln -sf gcc-9 /usr/bin/gcc &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/fail2ban/config-${SCRIPT_VER}.sh
|
|
|
|
ln -sf g++-9 /usr/bin/g++ &>/dev/null
|
|
|
|
# Add Fail2ban | banip
|
|
|
|
ln -sf cpp-9 /usr/bin/cpp &>/dev/null
|
|
|
|
source $MSTEMPDIR/mystic/dosemu2/config-${SCRIPT_VER}.sh
|
|
|
|
make shared &>/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
|
|
|
|
|
|
|
|
ln -sf libcl.so.3 ${LIBDIR}/libcl.so &>/dev/null
|
|
|
|
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Setting up ${APP} cryptlib for ssh/ssl (be patient compiling cryptlib)"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
if [ $IP2L = "Yes" ]; then
|
|
|
|
|
|
|
|
msg_info "Setting up IP2Location Download Client for ${APP}"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
pushd /usr/local/src/mystic/ip2location-downloader-linux &>/dev/null
|
|
|
|
|
|
|
|
unzip ../ip2location-downloader-linux.zip &>/dev/null
|
|
|
|
|
|
|
|
cp download.pl ${MYSTIC_DIR}/ip2location
|
|
|
|
|
|
|
|
chmod +x ${MYSTIC_DIR}/ip2location
|
|
|
|
|
|
|
|
cp readme.txt ${MYSTIC_DIR}/docs/ip2location_README.txt
|
|
|
|
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Setting up IP2Location Download Client for ${APP}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ $DBPSCRIPTS = "Yes" ]; then
|
|
|
|
|
|
|
|
msg_info "Installing bbs.disconnected-by-peer.at Scripts Dependencies for ${APP}"
|
|
|
|
|
|
|
|
wget -N https://ftp.disconnected-by-peer.at/IniMod/IniMod_linux_${INIMOD_ARCH}.zip -O /usr/local/src/mystic/IniMod_linux_${INIMOD_ARCH}.zip &>/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 bbs.disconnected-by-peer.at Scripts Dependencies for ${APP}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Installing DbP Cron/banip/unbanip Scripts"
|
|
|
|
|
|
|
|
pushd /usr/local/src/mystic/mystic/dbp &>/dev/null
|
|
|
|
|
|
|
|
bash install-${SCRIPT_VER}.sh $MYSTIC_DIR &>/dev/null
|
|
|
|
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Installing DbP Cron/banip/unbanip Scripts"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ $BANUNBAN = "fail2ban" ]; then
|
|
|
|
|
|
|
|
msg_info "Installing Fail2Ban Dependencies for ${APP}"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
usermod --append --groups fail2ban mystic &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Installing Fail2Ban Dependencies for ${APP}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_info "Installing Fail2Ban Scripts for ${APP}"
|
|
|
|
|
|
|
|
pushd /usr/local/src/mystic/mystic/fail2ban &>/dev/null
|
|
|
|
|
|
|
|
bash install-${SCRIPT_VER}.sh $MYSTIC_DIR &>/dev/null
|
|
|
|
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
msg_ok "Installing Fail2Ban Scripts for ${APP}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 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
|
|
|
|
|
|
|
|
sed -e 's!-qq!-qqo!g' -i /usr/local/src/mystic/ipban-install.sh &>/dev/null
|
|
|
|
|
|
|
|
sed -i '/nano/d' /usr/local/src/mystic/ipban-install.sh &>/dev/null
|
|
|
|
|
|
|
|
bash /usr/local/src/mystic/ipban-install.sh &>/dev/null
|
|
|
|
|
|
|
|
if [ -z "${IPBAN_GROUP}" ]; then
|
|
|
|
|
|
|
|
groupadd ipban &>/dev/null
|
|
|
|
|
|
|
|
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}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#msg_info "Installing Fail2Ban Scripts for ${APP}"
|
|
|
|
|
|
|
|
#pushd /usr/local/src/mystic/mystic/ipban &>/dev/null
|
|
|
|
|
|
|
|
#bash install-${SCRIPT_VER}.sh $MYSTIC_DIR &>/dev/null
|
|
|
|
|
|
|
|
#popd &>/dev/null
|
|
|
|
|
|
|
|
#msg_ok "Installing Fail2Ban Scripts for ${APP}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ $DOSEMU = "Yes" ]; then
|
|
|
|
|
|
|
|
msg_info "Installing DosEmu2 Dependencies for ${APP}"
|
|
|
|
|
|
|
|
pushd /usr/local/src/mystic &>/dev/null
|
|
|
|
|
|
|
|
curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6d9cd73b401a130336ed0a56ebe1b5ded2ad45d6' | tee /etc/apt/trusted.gpg.d/code.launchpad.net-dosemu2.asc &>/dev/null
|
|
|
|
|
|
|
|
echo "deb https://ppa.launchpadcontent.net/dosemu2/ppa/ubuntu $DIST main" | tee /etc/apt/sources.list.d/dosemu2.list &>/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
|
|
|
|
|
|
|
|
#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-${SCRIPT_VER}.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
|
|
|
|
|
|
|
|
sed -e "s!d:/nodelist!${MYSTIC_DIR}/files/nodelist!g" -i ${MYSTIC_DIR}/mutil.ini
|
|
|
|
|
|
|
|
sed -e 's/\\/\//g' -i ${MYSTIC_DIR}/mide.ini
|
|
|
|
|
|
|
|
sed -e "s!c:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mide.ini
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p ${MYSTIC_DIR}/mutil.d
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed '/\[General\]/q' | sed '$d' > ${MUTIL_DIR}/README.txt
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[General\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/General
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FIDONET\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FIDONET.NA
|
|
|
|
|
|
|
|
configarray=('Import_FIDONET.NA')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FILEBONE\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FILEBONE.NA
|
|
|
|
|
|
|
|
configarray+=('Import_FILEBONE.NA')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_FILEBONE\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_FILEBONE.NA
|
|
|
|
|
|
|
|
configarray+=('Export_FILEBONE.NA')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_AREAS\.BBS\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_AREAS.BBS
|
|
|
|
|
|
|
|
configarray+=('Export_AREAS.BBS')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_GOLDED\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_GOLDED
|
|
|
|
|
|
|
|
configarray+=('Export_GOLDED')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FILES\.BBS\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FILES.BBS
|
|
|
|
|
|
|
|
configarray+=('Import_FILES.BBS')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[MassUpload\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/MassUpload
|
|
|
|
|
|
|
|
configarray+=('MassUpload')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[GenerateTopLists\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/GenerateTopLists
|
|
|
|
|
|
|
|
configarray+=('GenerateTopLists')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[GenerateAllFiles\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/GenerateAllFiles
|
|
|
|
|
|
|
|
configarray+=('GenerateAllFiles')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PurgeMessageBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PurgeMessageBases
|
|
|
|
|
|
|
|
configarray+=('PurgeMessageBases')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackMessageBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackMessageBases
|
|
|
|
|
|
|
|
configarray+=('PackMessageBases')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PostTextFiles\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PostTextFiles
|
|
|
|
|
|
|
|
configarray+=('PostTextFiles')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_MessageBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_MessageBase
|
|
|
|
|
|
|
|
configarray+=('Import_MessageBase')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[ImportEchoMail\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/ImportEchoMail
|
|
|
|
|
|
|
|
configarray+=('ImportEchoMail')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[ExportEchoMail\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/ExportEchoMail
|
|
|
|
|
|
|
|
configarray+=('ExportEchoMail')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[MergeNodeLists\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/MergeNodeLists
|
|
|
|
|
|
|
|
configarray+=('MergeNodeLists')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[FileToss\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/FileToss
|
|
|
|
|
|
|
|
configarray+=('FileToss')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackFileBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackFileBases
|
|
|
|
|
|
|
|
configarray+=('PackFileBases')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[LinkMessages\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/LinkMessages
|
|
|
|
|
|
|
|
configarray+=('LinkMessages')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PurgeUserBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PurgeUserBase
|
|
|
|
|
|
|
|
configarray+=('PurgeUserBase')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackUserBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackUserBase
|
|
|
|
|
|
|
|
configarray+=('PackUserBase')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[FileSort\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/FileSort
|
|
|
|
|
|
|
|
configarray+=('FileSort')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[AutoHatch\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/AutoHatch
|
|
|
|
|
|
|
|
configarray+=('AutoHatch')
|
|
|
|
|
|
|
|
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[EchoNodeTracker\]/, $p' | sed '$d' > ${MUTIL_DIR}/EchoNodeTracker
|
|
|
|
|
|
|
|
configarray+=('EchoNodeTracker')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pushd ${MUTIL_DIR} &>/dev/null
|
|
|
|
|
|
|
|
#=====================================================================================#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configfile="maint.ini"
|
|
|
|
|
|
|
|
config=('PurgeMessageBases' 'PackMessageBases' 'MergeNodeLists' 'PackFileBases' 'PurgeUserBase' 'PackUserBase' 'FileSort')
|
|
|
|
|
|
|
|
preparray=("${configarray[@]}")
|
|
|
|
|
|
|
|
for el in ${config[@]}
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
preparray=("${preparray[@]/$el}")
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cat General ${config[@]} > ${MYSTIC_DIR}/${configfile}
|
|
|
|
|
|
|
|
for el in ${preparray[@]}
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
sed -e "/$el/d" -i ${MYSTIC_DIR}/${configfile}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#=====================================================================================#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configfile="mailout.ini"
|
|
|
|
|
|
|
|
config=('ExportEchoMail')
|
|
|
|
|
|
|
|
preparray=("${configarray[@]}")
|
|
|
|
|
|
|
|
for el in ${config[@]}
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
preparray=("${preparray[@]/$el}")
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cat General ${config[@]} > ${MYSTIC_DIR}/${configfile}
|
|
|
|
|
|
|
|
for el in ${preparray[@]}
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
sed -e "/$el/d" -i ${MYSTIC_DIR}/${configfile}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#=====================================================================================#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configfile="mailin.ini"
|
|
|
|
|
|
|
|
config=('ImportEchoMail' 'FileToss')
|
|
|
|
|
|
|
|
preparray=("${configarray[@]}")
|
|
|
|
|
|
|
|
for el in ${config[@]}
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
preparray=("${preparray[@]/$el}")
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cat General ${config[@]} > ${MYSTIC_DIR}/${configfile}
|
|
|
|
|
|
|
|
for el in ${preparray[@]}
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
sed -e "/$el/d" -i ${MYSTIC_DIR}/${configfile}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#=====================================================================================#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configfile="importna.ini"
|
|
|
|
|
|
|
|
config=('Import_FIDONET.NA' 'Import_FILEBONE.NA')
|
|
|
|
|
|
|
|
preparray=("${configarray[@]}")
|
|
|
|
|
|
|
|
for el in ${config[@]}
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
preparray=("${preparray[@]/$el}")
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cat General ${config[@]} > ${MYSTIC_DIR}/${configfile}
|
|
|
|
|
|
|
|
for el in ${preparray[@]}
|
|
|
|
|
|
|
|
do
|
|
|
|
|
|
|
|
sed -e "/$el/d" -i ${MYSTIC_DIR}/${configfile}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#=====================================================================================#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chown mystic:mystic -R ${MYSTIC_DIR} &>/dev/null
|
|
|
|
|
|
|
|
popd &>/dev/null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg_ok "Completed Successfully!\n"
|
|
|
|
msg_ok "Completed Successfully!\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DBP_INFO=${MYSTIC_DIR}/docs/DbP-install.info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "==============================================================================================================" > ${DBP_INFO}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Mystic install
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/mystic/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add Spellcheck
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/spellcheck/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add Multi Relay Chat Client
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/mrc-client/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add Multi Relay Chat Server
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/mrc-server/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add Cryptlib support
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/cryptlib/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add IP2Location
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/ip2location/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add DBP Scripts
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/dbp/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add Fail2ban | banip
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/fail2ban/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
# Add Fail2ban | banip
|
|
|
|
|
|
|
|
source $MSTEMPDIR/mystic/dosemu2/info-${SCRIPT_VER}.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#==============================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chown mystic:mystic -R ${MYSTIC_DIR} &>/dev/null
|
|
|
|
|
|
|
|
cat ${DBP_INFO}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "The Infos abouth has been put into ${DBP_INFO}"
|
|
|
|