From f6e535c7b72ce4524bdab733c7e939c505897b9b Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 16 Feb 2026 10:53:21 +0100 Subject: [PATCH] cryptpad: restore config earlier and run onlyoffice upgrade (#11964) --- ct/cryptpad.sh | 11 +++++++---- install/cryptpad-install.sh | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ct/cryptpad.sh b/ct/cryptpad.sh index b97b300ac..7ba797d53 100644 --- a/ct/cryptpad.sh +++ b/ct/cryptpad.sh @@ -39,17 +39,20 @@ function update_script() { CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball" + msg_info "Restoring configuration" + mv /opt/config.js /opt/cryptpad/config/ + msg_ok "Configuration restored" + msg_info "Updating CryptaPad" cd /opt/cryptpad $STD npm ci $STD npm run install:components + if [ -f "/opt/cryptpad/install-onlyoffice.sh" ]; then + $STD bash /opt/cryptpad/install-onlyoffice.sh --accept-license + fi $STD npm run build msg_ok "Updated CryptaPad" - msg_info "Restoring configuration" - mv /opt/config.js /opt/cryptpad/config/ - msg_ok "Configuration restored" - msg_info "Starting Service" systemctl start cryptpad msg_ok "Started Service" diff --git a/install/cryptpad-install.sh b/install/cryptpad-install.sh index 14581b888..43809a34c 100644 --- a/install/cryptpad-install.sh +++ b/install/cryptpad-install.sh @@ -26,13 +26,13 @@ msg_info "Setup CryptPad" cd /opt/cryptpad $STD npm ci $STD npm run install:components -$STD npm run build -cp config/config.example.js config/config.js -sed -i "51s/localhost/${LOCAL_IP}/g" /opt/cryptpad/config/config.js -sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/config/config.js if [[ "$onlyoffice" =~ ^[Yy]$ ]]; then $STD bash -c "./install-onlyoffice.sh --accept-license" fi +cp config/config.example.js config/config.js +sed -i "51s/localhost/${LOCAL_IP}/g" /opt/cryptpad/config/config.js +sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/config/config.js +$STD npm run build msg_ok "Setup CryptPad" msg_info "Creating Service"