diff --git a/ct/openarchiver.sh b/ct/openarchiver.sh index a92bbdf0..c65ec9f3 100644 --- a/ct/openarchiver.sh +++ b/ct/openarchiver.sh @@ -20,16 +20,35 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/openarchiver ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - msg_warn "Application is updated via Web Interface" + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/openarchiver ]]; then + msg_error "No Open Archiver Installation Found!" exit + fi + + if check_for_gh_release "openarchiver" "LogicLabs-OU/OpenArchiver"; then + msg_info "Stopping Services" + systemctl stop openarchiver + msg_ok "Stopped Services" + + cp /opt/openarchiver/.env /opt/openarchiver.env + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openarchiver" "LogicLabs-OU/OpenArchiver" "tarball" "latest" "/opt/openarchiver" + mv /opt/openarchiver.env /opt/openarchiver/.env + + msg_info "Updating Open Archiver" + $STD pnpm install --shamefully-hoist --frozen-lockfile --prod=false + $STD pnpm build + $STD pnpm db:migrate + msg_ok "Updated Open Archiver" + + msg_info "Starting Services" + systemctl start openarchiver + msg_ok "Started Services" + msg_ok "Updated Successfully" + fi + exit } start diff --git a/frontend/public/json/openarchiver.json b/frontend/public/json/openarchiver.json new file mode 100644 index 00000000..268d36da --- /dev/null +++ b/frontend/public/json/openarchiver.json @@ -0,0 +1,35 @@ +{ + "name": "Open Archiver", + "slug": "openarchiver", + "categories": [ + 7 + ], + "date_created": "2025-09-30", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://docs.openarchiver.com/", + "config_path": "/opt/openarchiver/.env", + "website": "https://openarchiver.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/OpenArchiver.webp", + "description": "Open Archiver is a secure, self-hosted email archiving solution, and it's completely open source. Get an email archiver that enables full-text search across email and attachments. Create a permanent, searchable, and compliant mail archive from Google Workspace, Microsoft 35, and any IMAP server.", + "install_methods": [ + { + "type": "default", + "script": "ct/openarchiver.sh", + "resources": { + "cpu": 2, + "ram": 3072, + "hdd": 8, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/openarchiver-install.sh b/install/openarchiver-install.sh index b92d54df..57c90092 100644 --- a/install/openarchiver-install.sh +++ b/install/openarchiver-install.sh @@ -89,8 +89,7 @@ sed -i "s|^ENCRYPTION_KEY=.*|ENCRYPTION_KEY=$SECRET_KEY|g" /opt/openarchiver/.en sed -i "s|^TIKA_URL=.*|TIKA_URL=|g" /opt/openarchiver/.env $STD pnpm install --shamefully-hoist --frozen-lockfile --prod=false $STD pnpm build -$STD pnpm db:generate -#$STD pnpm db:migrate +$STD pnpm db:migrate msg_ok "Setup Open Archiver" msg_info "Creating Service"