This commit is contained in:
Slaviša Arežina
2025-07-05 18:03:36 +02:00
committed by GitHub
parent c2f9737435
commit 9072459066
2 changed files with 41 additions and 50 deletions

View File

@@ -14,20 +14,15 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
git
$STD apt-get install -y git
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
read -p "${TAB3}Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice
read -rp "${TAB3}Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice
fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad"
msg_info "Setup ${APPLICATION}"
temp_file=$(mktemp)
RELEASE=$(curl -fsSL https://api.github.com/repos/cryptpad/cryptpad/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/cryptpad/cryptpad/archive/refs/tags/${RELEASE}.tar.gz" -o "$temp_file"
tar zxf $temp_file
mv cryptpad-$RELEASE /opt/cryptpad
cd /opt/cryptpad
$STD npm ci
$STD npm run install:components
@@ -39,7 +34,6 @@ sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/c
if [[ "$onlyoffice" =~ ^[Yy]$ ]]; then
$STD bash -c "./install-onlyoffice.sh --accept-license"
fi
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Setup ${APPLICATION}"
msg_info "Creating Service"
@@ -69,7 +63,6 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -f $temp_file
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"