Prepare V0.2

This commit is contained in:
Mario Fetka
2024-04-21 07:45:51 +02:00
parent c2744e173f
commit c2c83c2e6f
51 changed files with 671 additions and 9 deletions

0
mrc-client/config-v2.sh Normal file
View File

11
mrc-client/info-v2.sh Normal file
View File

@@ -0,0 +1,11 @@
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 retentiontame 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 runnign your own Multi Relay Chat Server you have to modify the ${MYSTIC_DIR}/mrc_client-start" >> ${DBP_INFO}
echo "" >> ${DBP_INFO}
echo "==============================================================================================================" >> ${DBP_INFO}
fi

30
mrc-client/install-v2.sh Normal file
View File

@@ -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

8
mrc-client/prompt-v2.sh Normal file
View File

@@ -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

3
mrc-client/update.sh Normal file
View File

@@ -0,0 +1,3 @@
for file in $(ls *-v1.sh) ; do
cp -- "${file}" "$(echo "${file}" | sed -e 's/v1\.sh/v2\.sh/')"
done