Skip to main content

Intelligent, interactive doctor that diagnoses, applies and removes fixes (patches) for known cPanel/WHM problems.

Project description

cPanel Doctor

Diagnose and fix known cPanel/WHM problems — intelligently, interactively, reversibly.

cPanel Doctor models each fix as a patch made of independent components. It knows whether a patch is applicable, fully applied, not applied, or drifted (partly reset — e.g. by a cPanel update), and it can apply, re-apply only the drifted bits, or cleanly remove a patch. There's a colourful Textual TUI and a scriptable CLI.

┌ cPanel Doctor v0.2.0 ──────────────────────────────────────────────┐
│ ID                   Status     Patch                              │
│ account-startdate    APPLIED    New accounts' creation date (past)  │
│ https-redirect-date  APPLIED    Force HTTPS Redirect (past date)    │
│ pg-cpses             APPLIED    phpPgAdmin / PostgreSQL cpses login │
│ post-upcp self-heal hook: installed (System::upcp post)            │
└─────────────────────────────────────────────────────────────────────┘

Install

pipx install cpanel-doctor        # recommended
# or
pip install cpanel-doctor

Requires Python 3.8+ (cPanel's system Python may be older — use pipx, a venv, or your distro's newer Python). Most actions modify system files and need root.

Use

cpanel-doctor                 # interactive TUI (default)
cpanel-doctor list            # one-line status per patch
cpanel-doctor status pg-cpses # detailed, per-component status
sudo cpanel-doctor apply pg-cpses
sudo cpanel-doctor apply pg-cpses --dry-run   # preview, change nothing
sudo cpanel-doctor remove pg-cpses
cpanel-doctor test pg-cpses    # functional self-test
sudo cpanel-doctor hook install # self-heal after cPanel updates

TUI keys

a apply · r remove · h re-apply drift · t self-test · k toggle hook · d refresh · q quit.

Self-healing after upcp

cPanel updates overwrite vendor-managed files (for pg-cpses, phpPgAdmin's config.inc.php/intro.php), which drifts a patch. Install the hook once:

sudo cpanel-doctor hook install

It registers a cPanel Standardized Hook on System::upcp (post stage) that runs cpanel-doctor reapply after every update, healing only the drifted components.

Patches

Three patches ship today — see PATCHES.md for full descriptions, security notes and a guide to writing your own.

ID Fixes
account-startdate new accounts recorded with a creation date in the past
https-redirect-date greyed-out Force HTTPS Redirect toggle
pg-cpses phpPgAdmin "Authentication failed" (broken pam_cpses.so)

New patches are auto-discovered — drop a Patch subclass in cpanel_doctor/patches/ (see PATCHES.md).

Safety

  • --dry-run previews every action without touching the system.
  • remove reverses each component (restoring .orig backups where taken).
  • Read-only status/list/test never change anything and don't need root.

License

MIT © crocky.host

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpanel_doctor-0.2.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cpanel_doctor-0.2.0-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file cpanel_doctor-0.2.0.tar.gz.

File metadata

  • Download URL: cpanel_doctor-0.2.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cpanel_doctor-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f0bea99419fcfb7bb5d055a8d64c5213afc43cdfaabe0b8e45aa07b99930aa3b
MD5 d7b73c7b1c8b79c7317e6cf48c5dbad0
BLAKE2b-256 227b3eeb6b938f79a55d4972aa2805bc94eafe6c94c419b7aad9c0f365952d31

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpanel_doctor-0.2.0.tar.gz:

Publisher: release.yml on CrockyHost/cpanel-doctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cpanel_doctor-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cpanel_doctor-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cpanel_doctor-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f3a7533af03ca15a0a8d6e9521c96fa714b162ae50184c18306517dca3c2563
MD5 90e83355479e796315eac54ed1fc84dd
BLAKE2b-256 f091c957b5290e87cdcda31e3e116b61387551949c0d0d6653a4d12e53dc3d18

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpanel_doctor-0.2.0-py3-none-any.whl:

Publisher: release.yml on CrockyHost/cpanel-doctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page