PHP 8.0.30
Preview: detectcp.py Size: 699 B
/opt/alt/alt-php-config/detectcp.py

#!/usr/libexec/platform-python
# -*- mode:python; coding:utf-8; -*-
import os


def getCPName():
    # cPanel
    if os.path.isfile('/usr/local/cpanel/cpanel'):
        return "cPanel"
    # DirectAdmin
    if os.path.isfile('/usr/local/directadmin/directadmin') or \
       os.path.isfile('/usr/local/directadmin/custombuild/build'):
        return "DirectAdmin"
    # InterWorx
    if os.path.isfile('/usr/local/interworx/iworx.ini'):
        return "InterWorx"
    # ISPManager
    if os.path.isfile('/usr/local/ispmgr/bin/ispmgr'):
        return "ISPManager"
    # Plesk
    if os.path.isfile('/usr/local/psa/version'):
        return "Plesk"
    # Unknown panel / No panel
    return "Unknown"

Directory Contents

Dirs: 1 × Files: 7

Name Size Perms Modified Actions
- drwxr-xr-x 2026-07-21 02:21:45
Edit Download
8.55 KB lrwxr-xr-x 2026-07-07 09:02:17
Edit Download
244 B lrw-r--r-- 2022-12-01 03:18:57
Edit Download
259 B lrw-r--r-- 2023-01-19 14:59:41
Edit Download
699 B lrwxr-xr-x 2026-07-07 09:02:17
Edit Download
740 B lrw-r--r-- 2021-11-27 03:18:27
Edit Download
526 B lrwxr-xr-x 2026-07-07 08:58:44
Edit Download
7.71 KB lrwxr-xr-x 2026-07-07 09:02:17
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).