From 4ed08e88f337d8d60b0a134d00656945cf2381d1 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 11 May 2024 11:12:46 +0200 Subject: [PATCH] get python ver --- cryptlib/config-v5.sh | 0 cryptlib/info-v5.sh | 7 ++++ cryptlib/install-v5.sh | 31 ++++++++++++++ cryptlib/prompt-v5.sh | 8 ++++ cryptlib/update.sh | 4 +- dbp/config-v5.sh | 0 dbp/info-v5.sh | 18 ++++++++ dbp/install-v5.sh | 24 +++++++++++ dbp/prompt-v5.sh | 8 ++++ dbp/update.sh | 4 +- dosemu2/config-v5.sh | 0 dosemu2/info-v5.sh | 8 ++++ dosemu2/install-v5.sh | 12 ++++++ dosemu2/prompt-v5.sh | 8 ++++ dosemu2/update.sh | 4 +- fail2ban/config-v5.sh | 0 fail2ban/info-v5.sh | 21 ++++++++++ fail2ban/install-v5.sh | 53 +++++++++++++++++++++++ fail2ban/prompt-v5.sh | 9 ++++ fail2ban/update.sh | 4 +- install-next.sh | 2 +- ip2location/config-v5.sh | 0 ip2location/info-v5.sh | 8 ++++ ip2location/install-v5.sh | 14 +++++++ ip2location/prompt-v5.sh | 8 ++++ ip2location/update.sh | 4 +- mrc-client/config-v5.sh | 0 mrc-client/info-v5.sh | 13 ++++++ mrc-client/install-v5.sh | 30 +++++++++++++ mrc-client/prompt-v5.sh | 8 ++++ mrc-client/update.sh | 4 +- mrc-server/config-v5.sh | 0 mrc-server/info-v5.sh | 11 +++++ mrc-server/install-v5.sh | 30 +++++++++++++ mrc-server/prompt-v5.sh | 8 ++++ mrc-server/update.sh | 4 +- mystic/config-v5.sh | 75 +++++++++++++++++++++++++++++++++ mystic/importna-v5.sh | 19 +++++++++ mystic/info-v5.sh | 12 ++++++ mystic/install-v5.sh | 88 +++++++++++++++++++++++++++++++++++++++ mystic/mailin-v5.sh | 19 +++++++++ mystic/mailout-v5.sh | 19 +++++++++ mystic/maint-v5.sh | 18 ++++++++ mystic/prompt-v5.sh | 13 ++++++ mystic/update.sh | 4 +- spellcheck/config-v5.sh | 0 spellcheck/info-v5.sh | 10 +++++ spellcheck/install-v5.sh | 16 +++++++ spellcheck/prompt-v5.sh | 8 ++++ spellcheck/update.sh | 4 +- 50 files changed, 653 insertions(+), 19 deletions(-) create mode 100644 cryptlib/config-v5.sh create mode 100644 cryptlib/info-v5.sh create mode 100644 cryptlib/install-v5.sh create mode 100644 cryptlib/prompt-v5.sh create mode 100644 dbp/config-v5.sh create mode 100644 dbp/info-v5.sh create mode 100644 dbp/install-v5.sh create mode 100644 dbp/prompt-v5.sh create mode 100644 dosemu2/config-v5.sh create mode 100644 dosemu2/info-v5.sh create mode 100644 dosemu2/install-v5.sh create mode 100644 dosemu2/prompt-v5.sh create mode 100644 fail2ban/config-v5.sh create mode 100644 fail2ban/info-v5.sh create mode 100644 fail2ban/install-v5.sh create mode 100644 fail2ban/prompt-v5.sh create mode 100644 ip2location/config-v5.sh create mode 100644 ip2location/info-v5.sh create mode 100644 ip2location/install-v5.sh create mode 100644 ip2location/prompt-v5.sh create mode 100644 mrc-client/config-v5.sh create mode 100644 mrc-client/info-v5.sh create mode 100644 mrc-client/install-v5.sh create mode 100644 mrc-client/prompt-v5.sh create mode 100644 mrc-server/config-v5.sh create mode 100644 mrc-server/info-v5.sh create mode 100644 mrc-server/install-v5.sh create mode 100644 mrc-server/prompt-v5.sh create mode 100644 mystic/config-v5.sh create mode 100644 mystic/importna-v5.sh create mode 100644 mystic/info-v5.sh create mode 100644 mystic/install-v5.sh create mode 100644 mystic/mailin-v5.sh create mode 100644 mystic/mailout-v5.sh create mode 100644 mystic/maint-v5.sh create mode 100644 mystic/prompt-v5.sh create mode 100644 spellcheck/config-v5.sh create mode 100644 spellcheck/info-v5.sh create mode 100644 spellcheck/install-v5.sh create mode 100644 spellcheck/prompt-v5.sh diff --git a/cryptlib/config-v5.sh b/cryptlib/config-v5.sh new file mode 100644 index 0000000..e69de29 diff --git a/cryptlib/info-v5.sh b/cryptlib/info-v5.sh new file mode 100644 index 0000000..c233e88 --- /dev/null +++ b/cryptlib/info-v5.sh @@ -0,0 +1,7 @@ +if [ $CRYPT = "Yes" ]; then +echo "" >> ${DBP_INFO} +echo "Mystic SSL Support" >> ${DBP_INFO} +echo "with the libcl support you can now activate ssl in the Mystic system" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} +fi diff --git a/cryptlib/install-v5.sh b/cryptlib/install-v5.sh new file mode 100644 index 0000000..ae7f7e9 --- /dev/null +++ b/cryptlib/install-v5.sh @@ -0,0 +1,31 @@ +if [ $CRYPT = "Yes" ]; then +msg_info "Setting up ${APP} cryptlib for ssh/ssl (be patient compiling cryptlib)" +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 $MSTEMPDIR/cryptlib345.zip &>/dev/null +rm -rf $MSTEMPDIR/cryptlib-3.4.5 &>/dev/null +mkdir -p $MSTEMPDIR/cryptlib-3.4.5 &>/dev/null +pushd $MSTEMPDIR/cryptlib-3.4.5 &>/dev/null +unzip ../cryptlib345.zip &>/dev/null +dos2unix tools/* &>/dev/null +dos2unix kernel/* &>/dev/null +patch -p1 -i $MSTEMPDIR/mystic/cryptlib/patches/gccversion-345.patch &>/dev/null +patch -p0 -i $MSTEMPDIR/mystic/cryptlib/patches/cl-linux-yield.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.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 + +apt purge -y gcc g++ cpp &>/dev/null +apt install -y gcc g++ cpp &>/dev/null +msg_ok "Setting up ${APP} cryptlib for ssh/ssl (be patient compiling cryptlib)" + +fi + diff --git a/cryptlib/prompt-v5.sh b/cryptlib/prompt-v5.sh new file mode 100644 index 0000000..93b40c0 --- /dev/null +++ b/cryptlib/prompt-v5.sh @@ -0,0 +1,8 @@ +CRYPT=$(whiptail --title "SSL SSH Support for 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 diff --git a/cryptlib/update.sh b/cryptlib/update.sh index c22977c..a6e6c5c 100644 --- a/cryptlib/update.sh +++ b/cryptlib/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file diff --git a/dbp/config-v5.sh b/dbp/config-v5.sh new file mode 100644 index 0000000..e69de29 diff --git a/dbp/info-v5.sh b/dbp/info-v5.sh new file mode 100644 index 0000000..41c92bd --- /dev/null +++ b/dbp/info-v5.sh @@ -0,0 +1,18 @@ +echo "" >> ${DBP_INFO} +echo "To activate the Disconnected-by-peer scripts for Mystic" >> ${DBP_INFO} +echo "you have to activate it in the Mystic Event Editor" >> ${DBP_INFO} +echo "Below is a suggested configuration" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "Active | Description | Event Type | Exec Hh:Mm | Shell | Prefix | Semaphore | Kill-After | Warning | SMTWTFS" >> ${DBP_INFO} +echo "-------+---------------------------+------------+------------+------------------------------------------+--------+--------------------------+--------------------------+---------+--------" >> ${DBP_INFO} +echo "Yes | Daily Tasks | Shell | 00:00 | cron -f dbp.ini | Yes | | | 0 | SMTWTFS" >> ${DBP_INFO} +echo "Yes | Nightly Maintenance | Shell | 04:00 | mutil maint | Yes | | | 0 | SMTWTFS" >> ${DBP_INFO} +echo "Yes | Firewall Ban | IP Blocked | 00:00 | banunban -f dbp.ini -d banip -i @IP@ | Yes | | | 0 | -------" >> ${DBP_INFO} +echo "Yes | Sending Out Echo/Net Mail | Semaphore | 00:00 | mutil mailout|mis poll send|mutil mailin | Yes | echomail.out|netmail.out | echomail.out|netmail.out | 0 | -------" >> ${DBP_INFO} +echo "Yes | Toss Incom Echo/Net Mail | Semaphore | 00:00 | mutil mailin | Yes | echomail.in|netmail.in | echomail.in|netmail.in | 0 | -------" >> ${DBP_INFO} +echo "Yes | Poll Echomail | Inteval | 01:05 | mis poll forced|mutil mailin | Yes | | | | SMTWTFS" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "Before activating any services you have to configure the ${MYSTIC_DIR}/dbp.ini file to your needs and installed services" >> ${DBP_INFO} +echo "then you can start the ./cron -f dbp.ini as the mystic user" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} diff --git a/dbp/install-v5.sh b/dbp/install-v5.sh new file mode 100644 index 0000000..829ecbc --- /dev/null +++ b/dbp/install-v5.sh @@ -0,0 +1,24 @@ +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 $MSTEMPDIR/IniMod_linux_${INIMOD_ARCH}.zip &>/dev/null +rm -rf $MSTEMPDIR/IniMod_linux_${INIMOD_ARCH} &>/dev/null +mkdir -p $MSTEMPDIR/IniMod_linux_${INIMOD_ARCH} &>/dev/null +pushd $MSTEMPDIR/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 $MSTEMPDIR/mystic/dbp &>/dev/null +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" cron.sh > ${MYSTIC_DIR}/cron +chmod +x ${MYSTIC_DIR}/cron +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" banunban.sh > ${MYSTIC_DIR}/banunban +chmod +x ${MYSTIC_DIR}/banunban +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" dbp.ini > ${MYSTIC_DIR}/dbp.ini +popd &>/dev/null +msg_ok "Installing DbP Cron/banip/unbanip Scripts" + +fi diff --git a/dbp/prompt-v5.sh b/dbp/prompt-v5.sh new file mode 100644 index 0000000..8f6d84b --- /dev/null +++ b/dbp/prompt-v5.sh @@ -0,0 +1,8 @@ +DBPSCRIPTS=$(whiptail --title "Add The Disconnected by Peer Support Script" --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 Support Script: ${BGN}$DBPSCRIPTS${CL}" +fi diff --git a/dbp/update.sh b/dbp/update.sh index c22977c..a6e6c5c 100644 --- a/dbp/update.sh +++ b/dbp/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file diff --git a/dosemu2/config-v5.sh b/dosemu2/config-v5.sh new file mode 100644 index 0000000..e69de29 diff --git a/dosemu2/info-v5.sh b/dosemu2/info-v5.sh new file mode 100644 index 0000000..0523703 --- /dev/null +++ b/dosemu2/info-v5.sh @@ -0,0 +1,8 @@ +if [ $DOSEMU = "Yes" ]; then +echo "" >> ${DBP_INFO} +echo "DosEmu2 Integration with Mystic" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "For the correct DosEmu2 integration follow the Mystic Doors doc ${MYSTIC_DIR}/docs/unix.install.txt" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} +fi diff --git a/dosemu2/install-v5.sh b/dosemu2/install-v5.sh new file mode 100644 index 0000000..6c9a5bf --- /dev/null +++ b/dosemu2/install-v5.sh @@ -0,0 +1,12 @@ +if [ $DOSEMU = "Yes" ]; then +msg_info "Installing DosEmu2 Dependencies for ${APP}" +pushd $MSTEMPDIR &>/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 $UBUNTU 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 + +msg_ok "Installing DosEmu2 Dependencies for ${APP}" + +fi diff --git a/dosemu2/prompt-v5.sh b/dosemu2/prompt-v5.sh new file mode 100644 index 0000000..f9427e7 --- /dev/null +++ b/dosemu2/prompt-v5.sh @@ -0,0 +1,8 @@ +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 diff --git a/dosemu2/update.sh b/dosemu2/update.sh index c22977c..a6e6c5c 100644 --- a/dosemu2/update.sh +++ b/dosemu2/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file diff --git a/fail2ban/config-v5.sh b/fail2ban/config-v5.sh new file mode 100644 index 0000000..e69de29 diff --git a/fail2ban/info-v5.sh b/fail2ban/info-v5.sh new file mode 100644 index 0000000..b1446f1 --- /dev/null +++ b/fail2ban/info-v5.sh @@ -0,0 +1,21 @@ +if [ $BANUNBAN = "fail2ban" ]; then +echo "" >> ${DBP_INFO} +echo "Fail2Ban Mystic integration" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "A Fail2ban Systemd service override has been installed so tha the unprivileged user mystic can add and remove " >> ${DBP_INFO} +echo "IP's to the fail2ban system" >> ${DBP_INFO} +echo "to activate the fail2ban integration you will have to enable it in the ${MYSTIC_DIR}/dbp.ini file" >> ${DBP_INFO} +echo " for this to work correctly you wil have to change the firewall Line in the Event Editor to the suggested" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} +fi + +if [ $BANUNBAN = "ipban" ]; then +echo "" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} +fi diff --git a/fail2ban/install-v5.sh b/fail2ban/install-v5.sh new file mode 100644 index 0000000..2b8dfc4 --- /dev/null +++ b/fail2ban/install-v5.sh @@ -0,0 +1,53 @@ +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 $MSTEMPDIR/mystic/fail2ban &>/dev/null +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" action.d/mysticbbs.conf > /etc/fail2ban/action.d/mysticbbs.conf +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" filter.d/mysticbbs.conf > /etc/fail2ban/filter.d/mysticbbs.conf +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" jail.d/mysticbbs.conf > /etc/fail2ban/jail.d/mysticbbs.conf +mkdir -p /etc/systemd/system/fail2ban.service.d +cp systemd/override.conf /etc/systemd/system/fail2ban.service.d/override.conf +popd &>/dev/null +msg_ok "Installing Fail2Ban Scripts for ${APP}" +fi + +if [ $BANUNBAN = "ipban" ]; then +msg_info "Installing IpBan Dependencies for ${APP}" +pushd $MSTEMPDIR &>/dev/null +wget -N https://github.com/DigitalRuby/IPBan/raw/master/IPBanCore/Linux/Scripts/Install.sh -O $MSTEMPDIR/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' $MSTEMPDIR/ipban-install.sh &>/dev/null +sed -i '/systemctl/d' $MSTEMPDIR/ipban-install.sh &>/dev/null +sed -e 's!sudo !!g' -i $MSTEMPDIR/ipban-install.sh &>/dev/null +sed -e 's!-qq!-qqo!g' -i $MSTEMPDIR/ipban-install.sh &>/dev/null +sed -i '/nano/d' $MSTEMPDIR/ipban-install.sh &>/dev/null +bash $MSTEMPDIR/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}" + +fi + + + + + + diff --git a/fail2ban/prompt-v5.sh b/fail2ban/prompt-v5.sh new file mode 100644 index 0000000..a32e8c3 --- /dev/null +++ b/fail2ban/prompt-v5.sh @@ -0,0 +1,9 @@ +BANUNBAN=$(whiptail --title "Add Ban / Unban 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 diff --git a/fail2ban/update.sh b/fail2ban/update.sh index c22977c..a6e6c5c 100644 --- a/fail2ban/update.sh +++ b/fail2ban/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file diff --git a/install-next.sh b/install-next.sh index 2174aff..3efe91f 100644 --- a/install-next.sh +++ b/install-next.sh @@ -13,7 +13,7 @@ APP="Mystic BBS" MSDIR="/opt/mystic" MSTEMPDIR="/usr/local/src/mystic" TMP_DIR=$(mktemp -d) -SCRIPT_VER="v4" +SCRIPT_VER="v5" GROUP=$(getent group mystic) USER=$(getent shadow mystic) diff --git a/ip2location/config-v5.sh b/ip2location/config-v5.sh new file mode 100644 index 0000000..e69de29 diff --git a/ip2location/info-v5.sh b/ip2location/info-v5.sh new file mode 100644 index 0000000..a49bf4b --- /dev/null +++ b/ip2location/info-v5.sh @@ -0,0 +1,8 @@ +if [ $IP2L = "Yes" ]; then +echo "IP2Location Downloader" >> ${DBP_INFO} +echo "With the downloader the IP2Location data of mystic can be updated" >> ${DBP_INFO} +echo "you will have to activate it in the ${MYSTIC_DIR}/dbp.ini" >> ${DBP_INFO} +echo "there you have to add your ip2location API key and set the database type" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} +fi diff --git a/ip2location/install-v5.sh b/ip2location/install-v5.sh new file mode 100644 index 0000000..12912d1 --- /dev/null +++ b/ip2location/install-v5.sh @@ -0,0 +1,14 @@ +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 $MSTEMPDIR/ip2location-downloader-linux.zip &>/dev/null +rm -rf $MSTEMPDIR/ip2location-downloader-linux &>/dev/null +mkdir -p $MSTEMPDIR/ip2location-downloader-linux &>/dev/null +pushd $MSTEMPDIR/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 diff --git a/ip2location/prompt-v5.sh b/ip2location/prompt-v5.sh new file mode 100644 index 0000000..0630981 --- /dev/null +++ b/ip2location/prompt-v5.sh @@ -0,0 +1,8 @@ +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 diff --git a/ip2location/update.sh b/ip2location/update.sh index c22977c..a6e6c5c 100644 --- a/ip2location/update.sh +++ b/ip2location/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file diff --git a/mrc-client/config-v5.sh b/mrc-client/config-v5.sh new file mode 100644 index 0000000..e69de29 diff --git a/mrc-client/info-v5.sh b/mrc-client/info-v5.sh new file mode 100644 index 0000000..001448c --- /dev/null +++ b/mrc-client/info-v5.sh @@ -0,0 +1,13 @@ +if [ $MRCCLIENT = "Yes" ]; then +echo "" >> ${DBP_INFO} +echo "Multi Relay Chat" >> ${DBP_INFO} +echo "when you are using the mrc then activate the logrotate in the ${MYSTIC_DIR}/dbp.ini file" >> ${DBP_INFO} +echo "and set the wanted retention time for the logs" >> ${DBP_INFO} +echo "you will also have to set the cron script in the Mystic Event Editor" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "if you are running your own Multi Relay Chat Server you have to modify the ${MYSTIC_DIR}/mrc_client-start" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "a systemd file has been installed mrc_client.service" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} +fi \ No newline at end of file diff --git a/mrc-client/install-v5.sh b/mrc-client/install-v5.sh new file mode 100644 index 0000000..07ebe55 --- /dev/null +++ b/mrc-client/install-v5.sh @@ -0,0 +1,30 @@ +MRC_VER="129a" + +if [ $MRCCLIENT = "Yes" ]; then +msg_info "Setting up Multi Relay Chat for ${APP}" +apt install -y build-essential &>/dev/null +wget -N https://www.phenomprod.com/releases/mystic/pn-mrc${MRC_VER}.zip -O $MSTEMPDIR/pn-mrc${MRC_VER}.zip &>/dev/null +rm -rf $MSTEMPDIR/pn-mrc${MRC_VER} &>/dev/null +mkdir -p $MSTEMPDIR/pn-mrc${MRC_VER} &>/dev/null +pushd $MSTEMPDIR/pn-mrc${MRC_VER} &>/dev/null +unzip ../pn-mrc${MRC_VER}.zip &>/dev/null +cp mrc_${MRC_VER}/mrc_{client,config}.py ${MYSTIC_DIR}/ +cp mrc_${MRC_VER}/scripts/* ${MYSTIC_DIR}/themes/default/scripts/ +cp mrc_${MRC_VER}/text/* ${MYSTIC_DIR}/themes/default/text/ +cp installation.asc ${MYSTIC_DIR}/docs/mrc_installation.asc +popd &>/dev/null +mkdir -p ${MYSTIC_DIR}/data/mrc &>/dev/null +msg_ok "Setting up Multi Relay Chat for ${APP}" + +msg_info "Installing Multi Relay Chat Systemd Start/Stop Scripts and Service File" +pushd $MSTEMPDIR/mystic/mrc-client &>/dev/null +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" mrc_client-start.sh > ${MYSTIC_DIR}/mrc_client-start +chmod +x ${MYSTIC_DIR}/mrc_client-start +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" mrc_client-stop.sh > ${MYSTIC_DIR}/mrc_client-stop +chmod +x ${MYSTIC_DIR}/mrc_client-stop +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" mrc-client.service > /etc/systemd/system/mrc-client.service +popd &>/dev/null +systemctl daemon-reload +msg_ok "Installing Multi Relay Chat Systemd Start/Stop Scripts and Service File" + +fi diff --git a/mrc-client/prompt-v5.sh b/mrc-client/prompt-v5.sh new file mode 100644 index 0000000..7687203 --- /dev/null +++ b/mrc-client/prompt-v5.sh @@ -0,0 +1,8 @@ +MRCCLIENT=$(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}$MRCCLIENT${CL}" +fi diff --git a/mrc-client/update.sh b/mrc-client/update.sh index c22977c..a6e6c5c 100644 --- a/mrc-client/update.sh +++ b/mrc-client/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file diff --git a/mrc-server/config-v5.sh b/mrc-server/config-v5.sh new file mode 100644 index 0000000..e69de29 diff --git a/mrc-server/info-v5.sh b/mrc-server/info-v5.sh new file mode 100644 index 0000000..f3dbf45 --- /dev/null +++ b/mrc-server/info-v5.sh @@ -0,0 +1,11 @@ +if [ $MRCSERVER = "Yes" ]; then +echo "" >> ${DBP_INFO} +echo "Multi Relay Chat Server" >> ${DBP_INFO} +echo "when you are using the mrc then activate the logrotate in the ${MYSTIC_DIR}/dbp.ini file" >> ${DBP_INFO} +echo "and set the wanted retention time for the logs" >> ${DBP_INFO} +echo "you will also have to set the cron script in the Mystic Event Editor" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "a systemd file has been installed mrc_server.service" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} +fi \ No newline at end of file diff --git a/mrc-server/install-v5.sh b/mrc-server/install-v5.sh new file mode 100644 index 0000000..42764e1 --- /dev/null +++ b/mrc-server/install-v5.sh @@ -0,0 +1,30 @@ +MRC_SERVER_VER="v10" + +if [ $MRCSERVER = "Yes" ]; then +msg_info "Setting up Multi Relay Chat Server for ${APP}" +apt install -y build-essential &>/dev/null +wget -N https://sourceforge.net/projects/mystic-relay-chat/files/mrc_${MRC_SERVER_VER}.zip -O $MSTEMPDIR/mrc${MRC_SERVER_VER}.zip &>/dev/null +rm -rf $MSTEMPDIR/mrc${MRC_SERVER_VER} &>/dev/null +mkdir -p $MSTEMPDIR/mrc${MRC_SERVER_VER} &>/dev/null +pushd $MSTEMPDIR/mrc${MRC_SERVER_VER} &>/dev/null +unzip ../mrc${MRC_SERVER_VER}.zip &>/dev/null +cp mrc_server.py ${MYSTIC_DIR}/ +cp sysop.doc ${MYSTIC_DIR}/docs/mrc_server_sysop.doc +cp whatsnew.txt ${MYSTIC_DIR}/docs/mrc_server_whatsnew.txt +cp servers.lst ${MYSTIC_DIR}/docs/mrc_server_server.lst +popd &>/dev/null +mkdir -p ${MYSTIC_DIR}/data/mrc &>/dev/null +msg_ok "Setting up Multi Relay Chat Server for ${APP}" + +msg_info "Installing Multi Relay Chat Server Systemd Start/Stop Scripts and Service File" +pushd $MSTEMPDIR/mystic/mrc-server &>/dev/null +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" mrc_server-start.sh > ${MYSTIC_DIR}/mrc_server-start +chmod +x ${MYSTIC_DIR}/mrc_server-start +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" mrc_server-stop.sh > ${MYSTIC_DIR}/mrc_server-stop +chmod +x ${MYSTIC_DIR}/mrc_server-stop +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" mrc-server.service > /etc/systemd/system/mrc-server.service +systemctl daemon-reload +popd &>/dev/null +msg_ok "Installing Multi Relay Chat Server Systemd Start/Stop Scripts and Service File" + +fi diff --git a/mrc-server/prompt-v5.sh b/mrc-server/prompt-v5.sh new file mode 100644 index 0000000..962016c --- /dev/null +++ b/mrc-server/prompt-v5.sh @@ -0,0 +1,8 @@ +MRCSERVER=$(whiptail --title "Multi Relay Chat Server Support in Mystic" --radiolist --cancel-button Exit-Script "Choose Yes No" 8 58 2 \ + "Yes" "Add MrC Server Support" OFF \ + "No" "Don't add MrC Server Support" ON \ + 3>&1 1>&2 2>&3) + exitstatus=$? +if [ $exitstatus = 0 ]; then + echo -e "${DGN}Add Multi Relay Chat Server Support: ${BGN}$MRCSERVER${CL}" +fi diff --git a/mrc-server/update.sh b/mrc-server/update.sh index c22977c..a6e6c5c 100644 --- a/mrc-server/update.sh +++ b/mrc-server/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file diff --git a/mystic/config-v5.sh b/mystic/config-v5.sh new file mode 100644 index 0000000..3fce4bc --- /dev/null +++ b/mystic/config-v5.sh @@ -0,0 +1,75 @@ +msg_info "Correcting mutil.ini & mide.ini hardcoded paths" +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 +msg_ok "Correcting mutil.ini & mide.ini hardcoded paths" + +msg_info "SPlitting mutil.ini into it's parts for later merge" +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') +cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[EchoUnlink\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/EchoUnlink +#cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[EchoUnlink\]/, $p' | sed '$d' > ${MUTIL_DIR}/EchoUnlink +configarray+=('EchoUnlink') +msg_ok "SPlitting mutil.ini into it's parts for later merge" + +source $MSTEMPDIR/mystic/mystic/maint-${SCRIPT_VER}.sh +source $MSTEMPDIR/mystic/mystic/mailout-${SCRIPT_VER}.sh +source $MSTEMPDIR/mystic/mystic/mailin-${SCRIPT_VER}.sh +source $MSTEMPDIR/mystic/mystic/importna-${SCRIPT_VER}.sh + +msg_info "Correcting Linefeed for docs and Setting permissions" +dos2unix ${MYSTIC_DIR}/docs/ &>/dev/null +chown mystic:mystic -R ${MYSTIC_DIR} &>/dev/null +msg_ok "Correcting Linefeed for docs and Setting permissions" diff --git a/mystic/importna-v5.sh b/mystic/importna-v5.sh new file mode 100644 index 0000000..2a71648 --- /dev/null +++ b/mystic/importna-v5.sh @@ -0,0 +1,19 @@ +pushd ${MUTIL_DIR} &>/dev/null + +configfile="importna.ini" +config=('Import_FIDONET.NA' 'Import_FILEBONE.NA') +msg_info "Merging ${config} into ${configfile}" +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 +msg_ok "Merging ${config} into ${configfile}" + +popd &>/dev/null diff --git a/mystic/info-v5.sh b/mystic/info-v5.sh new file mode 100644 index 0000000..4fabd0f --- /dev/null +++ b/mystic/info-v5.sh @@ -0,0 +1,12 @@ +PYTHON2=`ls ${LIBDIR}/libpython2*.so.1` +PYTHON3=`ls ${LIBDIR}/libpython3*.so.1` + +echo "" >> ${DBP_INFO} +echo "Settings in Mystic General Settings" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "Python2 Library: $PYTHON2" >> ${DBP_INFO} +echo "Python3 Library: $PYTHON3" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "a systemd file has been installed mystic.service" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} diff --git a/mystic/install-v5.sh b/mystic/install-v5.sh new file mode 100644 index 0000000..ac985b6 --- /dev/null +++ b/mystic/install-v5.sh @@ -0,0 +1,88 @@ +UPSTREAM="downloads" +#UPSTREAM="downloads/prealpha" +MYSTIC_VER="112a48" + +echo -e "Plz set the install dir the same as bevor" +echo -e "${DGN}Install Mystic to: ${BGN}$MYSTIC_DIR${CL}" +read -p "Press enter to continue" + +msg_info "Starting ${APP} Installation" +apt install -y python3 &>/dev/null + +PYTHON3_VER=$(python3 $MSTEMPDIR/mystic/mystic/python_ver.py) + +#apt install -y libpython${PYTHON3_VER} python2 libpython2.7 arj zip unrar dos2unix ${RARLAB} &>/dev/null +apt install -y libpython${PYTHON3_VER} python2 libpython2.7 arj zip unrar dos2unix ${RARLAB} +wget -N http://www.mysticbbs.com/${UPSTREAM}/mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} -O $MSTEMPDIR/mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} &>/dev/null +rm -rf $MSTEMPDIR/mystic-${MYSTIC_VER} &>/dev/null +mkdir -p $MSTEMPDIR/mystic-${MYSTIC_VER} &>/dev/null +pushd $MSTEMPDIR/mystic-${MYSTIC_VER} &>/dev/null +if [ "${MYSTIC_EXT}" = "rar" ]; then + unrar x $MSTEMPDIR/mys${MYSTIC_VER}_${MYSTIC_ARCH}.${MYSTIC_EXT} &>/dev/null +elif [ "${MYSTIC_EXT}" = "zip" ]; then + unzip $MSTEMPDIR/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" + +pushd ${MYSTIC_DIR} &>/dev/null +apt install -y patch &>/dev/null +patch -p0 -i $MSTEMPDIR/mystic/mystic/patches/mutil-ini-echounlink.patch &>/dev/null +popd &>/dev/null + +msg_info "Creating ${APP} und setting Permissions in ${MYSTIC_DIR}" +if [ -z "${GROUP}" ]; then +groupadd mystic &>/dev/null +fi +if [ -z "${USER}" ]; then +useradd -m --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}" + +msg_info "Installing ${APP} Systemd Start/Stop Scripts and Service File" +MID=$(id -u mystic) +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" $MSTEMPDIR/mystic/mystic/mis-start.sh > ${MYSTIC_DIR}/mis-start +chmod +x ${MYSTIC_DIR}/mis-start +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" $MSTEMPDIR/mystic/mystic/mis-stop.sh > ${MYSTIC_DIR}/mis-stop +chmod +x ${MYSTIC_DIR}/mis-stop +sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" $MSTEMPDIR/mystic/mystic/mis.service > /etc/systemd/system/mystic.service +sed -e "s!@MID@!${MID}!g" $MSTEMPDIR/mystic/mystic/mystic.conf.tmpfiles.d > /etc/tmpfiles.d/mystic.conf +systemctl daemon-reload +msg_ok "Installing ${APP} Systemd Start/Stop Scripts and Service File" + +msg_info "Setting up ${APP} Official lha (be patient compiling lha)" +apt install -y build-essential binutils make csh g++ sed gawk autoconf automake autotools-dev &>/dev/null +wget -N https://github.com/jca02266/lha/archive/refs/tags/release-20211125.zip -O $MSTEMPDIR/lha-20211125.zip &>/dev/null +rm -rf $MSTEMPDIR/lha-release-20211125 &>/dev/null +pushd $MSTEMPDIR &>/dev/null +unzip lha-20211125.zip &>/dev/null +popd &>/dev/null +pushd $MSTEMPDIR/lha-release-20211125 &>/dev/null +aclocal &>/dev/null +autoheader &>/dev/null +automake -a &>/dev/null +autoconf &>/dev/null +./configure &>/dev/null +make &>/dev/null +make install &>/dev/null +popd &>/dev/null +msg_ok "Setting up ${APP} Official lha (be patient compiling lha)" diff --git a/mystic/mailin-v5.sh b/mystic/mailin-v5.sh new file mode 100644 index 0000000..cbb7b35 --- /dev/null +++ b/mystic/mailin-v5.sh @@ -0,0 +1,19 @@ +pushd ${MUTIL_DIR} &>/dev/null + +configfile="mailin.ini" +config=('ImportEchoMail' 'FileToss') +msg_info "Merging ${config} into ${configfile}" +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 +msg_ok "Merging ${config} into ${configfile}" + +popd &>/dev/null diff --git a/mystic/mailout-v5.sh b/mystic/mailout-v5.sh new file mode 100644 index 0000000..78992fc --- /dev/null +++ b/mystic/mailout-v5.sh @@ -0,0 +1,19 @@ +pushd ${MUTIL_DIR} &>/dev/null + +configfile="mailout.ini" +config=('ExportEchoMail') +msg_info "Merging ${config} into ${configfile}" +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 +msg_ok "Merging ${config} into ${configfile}" + +popd &>/dev/null diff --git a/mystic/maint-v5.sh b/mystic/maint-v5.sh new file mode 100644 index 0000000..7539563 --- /dev/null +++ b/mystic/maint-v5.sh @@ -0,0 +1,18 @@ +pushd ${MUTIL_DIR} &>/dev/null + +configfile="maint.ini" +config=('PurgeMessageBases' 'PackMessageBases' 'MergeNodeLists' 'PackFileBases' 'LinkMessages' 'PurgeUserBase' 'PackUserBase' 'FileSort') +msg_info "Merging ${config} into ${configfile}" +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 +msg_ok "Merging ${config} into ${configfile}" +popd &>/dev/null diff --git a/mystic/prompt-v5.sh b/mystic/prompt-v5.sh new file mode 100644 index 0000000..b04a9bb --- /dev/null +++ b/mystic/prompt-v5.sh @@ -0,0 +1,13 @@ +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 diff --git a/mystic/update.sh b/mystic/update.sh index c22977c..a6e6c5c 100644 --- a/mystic/update.sh +++ b/mystic/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file diff --git a/spellcheck/config-v5.sh b/spellcheck/config-v5.sh new file mode 100644 index 0000000..e69de29 diff --git a/spellcheck/info-v5.sh b/spellcheck/info-v5.sh new file mode 100644 index 0000000..3aed009 --- /dev/null +++ b/spellcheck/info-v5.sh @@ -0,0 +1,10 @@ +if [ $SPELL = "Yes" ]; then +echo "" >> ${DBP_INFO} +echo "More infos about the Spellcheck can be found in the" >> ${DBP_INFO} +echo "${MYSTIC_DIR}/docs/Spellcheck_README.txt" >> ${DBP_INFO} +echo "Also in" >> ${DBP_INFO} +echo "${MYSTIC_DIR}/data/dictlist.txt" >> ${DBP_INFO} +echo "you can add additional Hunspell compatible dictionaries" >> ${DBP_INFO} +echo "" >> ${DBP_INFO} +echo "==============================================================================================================" >> ${DBP_INFO} +fi diff --git a/spellcheck/install-v5.sh b/spellcheck/install-v5.sh new file mode 100644 index 0000000..a32bf8b --- /dev/null +++ b/spellcheck/install-v5.sh @@ -0,0 +1,16 @@ +if [ $SPELL = "Yes" ]; then +msg_info "Setting up Spellcheck for ${APP}" +apt install -y libhunspell-dev &>/dev/null +wget -N http://www.mysticbbs.com/downloads/mystic_spellcheck_v2.zip -O $MSTEMPDIR/mystic_spellcheck_v2.zip &>/dev/null +rm -rf $MSTEMPDIR/mystic_spellcheck_v2 &>/dev/null +mkdir -p $MSTEMPDIR/mystic_spellcheck_v2 &>/dev/null +pushd $MSTEMPDIR/mystic_spellcheck_v2 &>/dev/null +unzip ../mystic_spellcheck_v2.zip &>/dev/null +cp dictionary.* ${MYSTIC_DIR}/data/ +cp wordlist.txt ${MYSTIC_DIR}/data/ +cp README.txt ${MYSTIC_DIR}/docs/Spellcheck_README.txt +echo "; List secondary dicitinoaries in this File" > ${MYSTIC_DIR}/data/dictlist.txt +echo "; more details in the Spellcheck_README.txt" >> ${MYSTIC_DIR}/data/dictlist.txt +popd &>/dev/null +msg_ok "Setting up Spellcheck for ${APP}" +fi diff --git a/spellcheck/prompt-v5.sh b/spellcheck/prompt-v5.sh new file mode 100644 index 0000000..0751fe4 --- /dev/null +++ b/spellcheck/prompt-v5.sh @@ -0,0 +1,8 @@ +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 diff --git a/spellcheck/update.sh b/spellcheck/update.sh index c22977c..a6e6c5c 100644 --- a/spellcheck/update.sh +++ b/spellcheck/update.sh @@ -1,3 +1,3 @@ -for file in $(ls *-v3.sh) ; do - cp -- "${file}" "$(echo "${file}" | sed -e 's/v3\.sh/v4\.sh/')" +for file in $(ls *-v4.sh) ; do + cp -- "${file}" "$(echo "${file}" | sed -e 's/v4\.sh/v5\.sh/')" done \ No newline at end of file