Skip to content

feat(linux): aaPanel-style site config dialog & MySQL root password fixes - #8

Closed
plusemon wants to merge 3 commits into
wpexpertinbd:masterfrom
plusemon:fix/mysql-root-password-removal
Closed

feat(linux): aaPanel-style site config dialog & MySQL root password fixes#8
plusemon wants to merge 3 commits into
wpexpertinbd:masterfrom
plusemon:fix/mysql-root-password-removal

Conversation

@plusemon

Copy link
Copy Markdown
Contributor

Summary

1. aaPanel-style Site Configuration Dialog

  • Replaces the compact 3-dot dropdown popover on each site row with a full-featured aaPanel-style site configuration modal dialog (SiteConfigDialog).
  • Two-pane layout (780×530px):
    • Domain Manager: Inline subdomain alias manager with instruction card, add action, and a table showing the primary domain and subdomains with quick links and delete controls.
    • Directory: Document root path selector with a file dialog browser, and quick launch buttons (Open Folder, Open in Editor, Open Terminal).
    • Config: Built-in monospace configuration viewer for ~/.bhserve/nginx/sites/<name>.conf (or Apache/OLS) with reload and external editor integration.
    • SSL: Active SSL status indicator with actions to install, reinstall (fresh certificate), or safely remove SSL.
    • PHP Version: Current PHP version badge with dropdown selector for installed PHP versions and switch action.
    • Web Server: Switcher between Nginx (Direct PHP), Apache (Reverse Proxy), and OpenLiteSpeed (OLS).
    • Share / Tunnel: Cloudflare Tunnel manager with live public URL, copy, and stop/start controls.
    • Delete Site: Danger zone section with warnings and safe deletion confirmation.
  • Styling: Added custom CSS for sidebar navigation, cards, notice boxes, and danger zone elements in style.css.

2. MySQL Root Password Handling

  • Handles setting, changing, and removing the MySQL/MariaDB root password securely.
  • Avoids exposing sensitive credentials in argv or configuration files by using environment variables (BHSERVE_DB_PASSWORD, BHSERVE_OLD_DB_PASSWORD).
  • Prompts for current root password when a password is already set.

Verification

  • Built and packaged via linux/build.sh.
  • Tested installation on Ubuntu via dpkg.
  • Verified Python AST compilation across modified files.

…t of argv

- db_root_passwd no longer persists root_password to bhserve.json (all 5 paths
  dropped); the GUI re-prompts for the current password instead, so nothing is
  stored and nothing needs json_esc/round-trip handling.
- Remove the now-dead saved_pw config fallback from mysql_run (both engines).
- pkexec/sudo fallbacks pipe the SQL on stdin (printf '%s\n' "" | ${SUDO-sudo}
  "$cli") instead of -e "$sql", keeping the ALTER out of ps + the polkit/sudo
  audit log; ${SUDO-sudo} also fixes the set -u unbound-variable abort on macOS
  while honoring the Linux SUDO="" = already-root convention.
- config show/cmd_api/cmd_status now redact any legacy root_password (config_dump)
  and fix the trailing comma a pre-fix build left, so the 4s GUI poll stays clean.
@plusemon plusemon closed this by deleting the head repository Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant