Important WHM/cPanel Scripts

WHM/cPanel is one of the most widely using webhosting control panel. We already covered a lot of topic of the same. There are a lot of backend scripts available with cPanel. It simplifies a lot things on commandline operation. A cPanel SysAdmin must know the following back-end scripts available with it.

cPanel/whm scripts are located in /scripts/       [[ >> Click here to install cPanel <<]]

Here I’m listing some useful scripts available with cPanel.

To take backup and restoration.

+ prepkgacct
+ pkgacct – used to backup an account
+ postpkgacct

+ prerestoreacct
+ restorepkg – restores an account from a backup file ( pkgacct file)
+ postrestoreacct

Account termination.

+ prekillacct – Runs before account termination
+ killacct – terminate an account – make sure you take a backup of the account first
+ postkillacct – Runs after account termination

Suspending an account.

+ presuspendacct
+ suspendacct – suspends an account
+ postsuspendacct

+ preunsuspendacct
+ unsuspendacct – unsuspends a suspended account
+ postunsuspendacct

cPanel backup.

+ precpbackup – Runs before the cPanel backup
+ cpbackup – cpanel back up
+ postcpbackup – Runs after cPanel backup

You must update /etc/cpbackup.conf for the precpbackup and postcpbackup script hooks to run. Use a text editor to specify PREBACKUP 1 in /etc/cpbackup.conf forprecpbackup, and POSTBACKUP 1 in /etc/cpbackup.conf for postcpbackup.

Rebuilding Apache and PHP.

+ easyapache – recompile/upgrade apache and/or php

Restarting services.

+ restartsrv – restart script for services

cpanel UPDATE

+ preupcp
+ upcp – updates cpanel to the latest version
+ postupcp

+ updatenow – updates the cPanel scripts
+ listassignednsips – list nameservers details.
+ addns – add a dns zone
+ addfpmail – Add frontpage mail extensions to all domains without them
+ addfpmail2 -Add frontpage mail extensions to all domains without them
+ addnetmaskips – Add the netmask 255.255.255.0 to all IPs that have no netmask
+ addnobodygrp – Adds the gorup nobody and activates security
+ addpop – add a pop account
+ addservlets – Add JSP support to an account (requires tomcat)
+ addstatus – (Internal use never called by user)
+ adduser – Add a user to the system
+ bandwidth – (OLD)
+ betaexim – Installs the latest version of exim
+ biglogcheck – looks for logs nearing 2 gigabytes in size
+ bsdcryptoinstall – Installs crypto on FreeBSD
+ bsdldconfig – Configures the proper lib directories in FreeBSD
+ bsdpkgpingtest – Tests the connection speed for downloading FreeBSD packages
+ buildbsdexpect – Install expect on FreeBSD
+ builddomainaddr – (OLD)
+ buildeximconf – Rebuilds exim.conf
+ buildpostgrebsd-dev – Installs postgresql on FreeBSD.
+ chcpass – change cpanel passwords
+ exim4 – reinstall exim and fix permissions
+ fixcommonproblems – fixes most common problems
+ fixfrontpageperm – fixes permission issues with Front Page
+ fixmailman – fixes common mailman issues
+ fixnamed – fixes common named issues
+ fixndc – fixes rndc errors with named
+ fixquotas – fixes quota problems
+ fullhordereset – resets horde database to a fresh one – all previous user data are lost
+ initquotas – initializes quotas
+ installzendopt – installs zend optimizer
+ mailperm – fixes permission problems with inboxes
+ park – to park a domain
+ runlogsnow – update logs of all users
+ runweblogs – update stats for a particular user
+ securetmp – secures /tmp partition with options nosuexec and nosuid
+ updateuserdomains – updates userdomain entries

Thanks!

Related:

1, Enabling email authentication (SPF and DKIM) for all existing accounts – cPanel/WHM
2, For loop to manage multiple IP addresses with CSF
3, Simple script to list dedicated IP address usage of domains under a Reseller – WHM/cPanel

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

6 thoughts on “Important WHM/cPanel Scripts

  1. I need assistance.

    Want a guide or tutorial on how I can start my own name server based on cPanel DNS only.

    Thanks
    Mo

  2. I came through for some reference. Anyway I got answer from your blog.

    Thank you for detailed post.

    By shiju

Leave a Reply

Your email address will not be published. Required fields are marked *