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.
+ pkgacct – used to backup an account
+ restorepkg – restores an account from a backup file ( pkgacct file)
+ 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.
+ suspendacct – suspends an account
+ unsuspendacct – unsuspends a suspended account
+ 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
+ restartsrv – restart script for services
+ upcp – updates cpanel to the latest version
+ 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
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