Scripts in /scripts directory explanation

September 30, 2009 • By admincPanel

WebHost Manager (WHM) ships with a large number of predefined administrative scripts located in the /scripts folder. These scripts allow server administrators to perform common tasks quickly from the command line without logging into the WHM web interface.

Common WHM /scripts

Below is an overview of frequently used scripts found in the /scripts directory:

  • adddns - Add a new DNS zone to the server.
  • addfpmail - Add a frontpage mail configuration.
  • addnetmaskips - Add a range of IP addresses using a netmask.
  • addpop - Add a POP3 email account for a domain.
  • addservlets - Add servlet support (Tomcat) to an account.
  • adduser - Create a new cPanel hosting account.
  • admin - Perform general admin tasks on the server.
  • apachelimits - Set Apache resource limits for accounts.
  • cpbackup - Run a cPanel backup for all or specific accounts.
  • chpass - Change the password for a cPanel account.
  • cleandns8 - Clean up stale or orphaned DNS zone entries.
  • dnstransfer - Transfer DNS zones to or from the server.
  • editquota - Edit disk quota settings for an account.
  • findhacks - Scan the server for signs of compromise or hacking.
  • findtrojans - Search the server for known trojan files.
  • fixcommonproblems - Automatically detect and fix common server issues.
  • fixeverything - Run all available fix routines to resolve server problems.
  • fixquotas - Rebuild disk quota database and fix quota inconsistencies.
  • fixwebalizer - Repair Webalizer statistics configuration for accounts.
  • gencrt - Generate a self-signed SSL certificate for a domain.
  • initquotas - Initialize disk quota support on the server filesystem.
  • installspam - Install and configure SpamAssassin on the server.
  • installssl - Install an SSL certificate for a specified domain.
  • restartsrv - Restart a specified service (e.g., /scripts/restartsrv apache).
  • rebuildhttpdconf - Rebuild the Apache httpd.conf from cPanel account data.
  • upcp - Update cPanel to the latest release.
  • updatenow - Force an immediate cPanel update check and installation.

Running Scripts

All scripts must be run as root from the command line. For example, to rebuild the Apache configuration:

/scripts/rebuildhttpdconf

Always exercise caution when running these scripts on production servers. Some scripts, such as fixeverything, can make sweeping changes to your server configuration.