mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-10 09:35:39 +00:00
cf219a3e5a
Add an offline-diagnosis script and Copilot guidelines, update Docker flow to require local image builds, and promote hbbs-patch-v2 binaries with checksums. Highlights: - New dev_modules/diagnose_offline_status.sh to detect and fix "all devices offline" issues. - Added .github/copilot-instructions.md with project state and build guidelines for Copilot. - Emphasized local Docker builds in DOCKER_SUPPORT.md, DOCKER_TROUBLESHOOTING.md, docker-compose.yml and docker-quickstart.sh (replace pull with build/rebuild). - Updated docs/TROUBLESHOOTING_EN.md and README to document offline-status causes/fixes and Windows/Linux v2 binaries (API port 21114). - Added hbbs-patch-v2 Windows binaries, updated CHECKSUMS.md, and removed legacy hbbs-patch v1 files. - Bumped VERSION to 1.5.5 and adjusted installer scripts (install-improved.sh/ps1) accordingly. These changes improve diagnostics, clarify deployment (Docker/local builds), and roll out the v2 BetterDesk server binaries with verification info.
Development Modules
This directory contains development and testing utilities for BetterDesk Console.
Contents
Testing Scripts
- test_ban_api.sh - Test script for ban/unban API endpoints
- Tests device banning functionality
- Validates API responses
- Usage:
./test_ban_api.sh
Diagnostic Tools
-
check_database.py - Database inspection and validation tool
- Checks database schema
- Verifies migrations applied
- Lists devices and their status
- Usage:
python3 check_database.py
-
check_and_fix_database.sh - Database Schema Checker & Fixer ⭐
- Automatically detects database location
- Validates all required tables and columns
- Fixes missing or incorrect schema
- Creates backup before making changes
- Creates admin user if missing
- Usage:
sudo ./check_and_fix_database.sh [database_path] - Example:
sudo ./check_and_fix_database.sh /opt/rustdesk/db_v2.sqlite3 - Use this if you have login problems!
-
fix_peer_columns.sh - Quick Fix for Device Errors ⭐
- Adds missing columns to peer table (updated_at, deleted_at, etc.)
- Fixes "no such column: updated_at" error
- Usage:
sudo ./fix_peer_columns.sh [database_path] - Use this if you get 500 errors when editing devices!
-
fix_systemd_services.sh - Fix Systemd Services for API Binaries ⭐ NEW
- Scans for all RustDesk systemd services (hbbs.service, rustdesksignal.service, etc.)
- Updates ExecStart to use API-enabled binaries (hbbs-v8-api, hbbr-v8-api)
- Creates backup of original service files
- Usage:
sudo ./fix_systemd_services.sh [rustdesk_path] - Example:
sudo ./fix_systemd_services.sh /opt/rustdesk - Use this if RustDesk services still use original binaries after installation!
Development Scripts
- update.ps1 - PowerShell update script (Windows development environment)
- Alternative to update.sh for Windows
- Updates web console components
Usage
These tools are for development and testing only. They are not required for production deployment.
Requirements
- Python 3.8+ (for check_database.py)
- Bash (for test_ban_api.sh)
- curl (for API testing)
Notes
- These scripts assume a local or test RustDesk server installation
- Always test on non-production systems first
- See main README.md for production deployment
Contributing
When adding new development tools:
- Document usage in this README
- Add appropriate shebang and error handling
- Include comments explaining functionality
- Test on clean environment before committing