From 41f5138c3de22d97ccd0fe92859a6452d1fa4781 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 13 Mar 2025 12:55:52 +0100 Subject: [PATCH] add onlyoffice --- ct/cryptpad.sh | 2 +- install/cryptpad-install.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ct/cryptpad.sh b/ct/cryptpad.sh index 659d447..12a0ca6 100644 --- a/ct/cryptpad.sh +++ b/ct/cryptpad.sh @@ -61,4 +61,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/cryptpad-install.sh b/install/cryptpad-install.sh index 1c7e7f4..9b4ad7c 100644 --- a/install/cryptpad-install.sh +++ b/install/cryptpad-install.sh @@ -33,6 +33,8 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Setup Node.js" +read -p "Do you want to install OnlyOffice components? (Y/N): " onlyoffice + msg_info "Setup ${APPLICATION}" RELEASE=$(curl -s https://api.github.com/repos/cryptpad/cryptpad/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') cd /opt @@ -41,9 +43,12 @@ cd cryptpad $STD git checkout $RELEASE $STD npm ci $STD npm run install:components -#$STD bash -c ./install-onlyoffice.sh cp config/config.example.js config/config.js sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/config/config.js +if [[ "$onlyoffice" =~ ^[Yy]$ ]]; then + sed '24d' install-onlyoffice.sh + $STD bash -c ./install-onlyoffice.sh +fi echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Setup ${APPLICATION}"