move 1st part to new install script
This commit is contained in:
parent
51334c1a87
commit
7c6563c691
104
install-next.sh
104
install-next.sh
@ -79,7 +79,7 @@ CODENAME=$(lsb_release -c -s)
|
||||
LIBDIR=/usr/lib/${ARCH}
|
||||
MYSTIC_VER="112a48"
|
||||
MRC_VER="129a"
|
||||
MRC_SERVER_VER="129a"
|
||||
MRC_SERVER_VER="v10"
|
||||
|
||||
if [ "${ARCH}" = "x86_64-linux-gnu" ]; then
|
||||
INIMOD_ARCH="amd64"
|
||||
@ -176,104 +176,18 @@ source $MSTEMPDIR/mystic/dosemu2/prompt-${SCRIPT_VER}.sh
|
||||
|
||||
#==============================================================================================================
|
||||
|
||||
# Add Fail2ban | banip
|
||||
|
||||
# Mystic install
|
||||
source $MSTEMPDIR/mystic/mystic/install-${SCRIPT_VER}.sh
|
||||
# Add Spellcheck
|
||||
source $MSTEMPDIR/mystic/spellcheck/install-${SCRIPT_VER}.sh
|
||||
# Add Multi Relay Chat Client
|
||||
source $MSTEMPDIR/mystic/mrc-client/install-${SCRIPT_VER}.sh
|
||||
# Add Multi Relay Chat Server
|
||||
source $MSTEMPDIR/mystic/mrc-server/install-${SCRIPT_VER}.sh
|
||||
|
||||
exit 0
|
||||
|
||||
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 $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 ../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 "Installing ${APP} Systemd Start/Stop Scripts and Service File"
|
||||
pushd $MSTEMPDIR/mystic/mis &>/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
|
||||
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
|
||||
|
||||
#==============================================================================================================
|
||||
|
||||
if [ $MRC = "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
|
||||
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
|
||||
bash install-${SCRIPT_VER}.sh $MYSTIC_DIR &>/dev/null
|
||||
popd &>/dev/null
|
||||
msg_ok "Installing Multi Relay Chat Systemd Start/Stop Scripts and Service File"
|
||||
|
||||
fi
|
||||
|
||||
#==============================================================================================================
|
||||
|
||||
if [ $CRYPT = "Yes" ]; then
|
||||
|
@ -1,11 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
MYSTIC_DIR="$1"
|
||||
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
|
||||
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
|
||||
|
@ -1,11 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
MYSTIC_DIR="$1"
|
||||
if [ $MRCSERVER = "Yes" ]; then
|
||||
msg_info "Setting up Multi Relay Chat 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_${MRC_SERVER_VER}/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 server.lst ${MYSTIC_DIR}/docs/mrc_server_server.lst
|
||||
popd &>/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_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 Systemd Start/Stop Scripts and Service File"
|
||||
|
||||
fi
|
||||
|
@ -1,6 +1,6 @@
|
||||
MRCSERVER=$(whiptail --title "Multi Relay Chat Server Support in Mystic" --radiolist --cancel-button Exit-Script "Choose Yes No" 8 58 2 \
|
||||
"Yes" "Add MrC Support" OFF \
|
||||
"No" "Don't add MrC Support" ON \
|
||||
"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
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user