mystic/mrc-client/install-v1.sh

29 lines
1.4 KiB
Bash
Raw Normal View History

2024-04-20 12:20:30 +02:00
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
2024-04-20 14:49:31 +02:00
mkdir -p ${MYSTIC_DIR}/data/mrc &>/dev/null
2024-04-20 12:20:30 +02:00
msg_ok "Setting up Multi Relay Chat for ${APP}"
2024-04-18 07:51:25 +02:00
2024-04-20 12:20:30 +02:00
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
2024-04-18 07:51:25 +02:00
chmod +x ${MYSTIC_DIR}/mrc_client-start
sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" mrc_client-stop.sh > ${MYSTIC_DIR}/mrc_client-stop
2024-04-18 07:51:25 +02:00
chmod +x ${MYSTIC_DIR}/mrc_client-stop
sed -e "s!@MYSTIC_DIR@!${MYSTIC_DIR}!g" mrc-client.service > /etc/systemd/system/mrc-client.service
2024-04-20 12:20:30 +02:00
popd &>/dev/null
2024-04-18 07:51:25 +02:00
systemctl daemon-reload
2024-04-20 12:20:30 +02:00
msg_ok "Installing Multi Relay Chat Systemd Start/Stop Scripts and Service File"
2024-04-18 07:51:25 +02:00
2024-04-20 12:20:30 +02:00
fi