Did you know that if you have cPanel/WHM on your server, you also have a bunch of serverside commands that you can use? These are good for advanced users, or the people who prefer to manage their servers in a hurry via the command line rather than waiting for a web interface to load.
Nearly everything that you can do in the WHM backend can be performed via command line. These scripts are located in your server’s /scripts/ directory. Only use scripts that have been verified by cPanel, or that you know yourself are safe as an unsafe script may damage your server.
Long list of scripts after the break…
To use any of these scripts, prefix it with /scripts/, for example, to package an account for backup you would type:
/scripts/pkgacct accountusernamehere (replacing that with the account name on your server that you wish to backup)
build_maxemails_config— Sets limits on the amount of email that users can send from domains on your server. For more information about configuring limits with this script, see our documentation here.easyapache— Upgrades and reinstalls Apache.phpextensionmgr— Manages PHP extensions.*up— Updates a service. We currently provide the following update scripts for the services noted:- bandminup — Bandmin application.
- courierup — Courier mail server.
- cpaddonsup — cPanel’s addon scripts.
- dovecotup — Dovecot mail server.
- eximup — Exim mail exchanger.
- ftpup — FTP servers (ProFTP and Pure-FTP).
- imapup — IMAP mail server.
- mysqlup —MySQL service.
- nsdup — BIND nameserver.
- phpup — Current version of PHP.
- suphpup — SuPHP tool for handling PHP requests.
restartsrv_*— Restarts a service. We currently provide restart scripts for the following; simply replace the asterisk (*) inrestartsrv_*with the term in bold:- apache — Apache web server.
- bind — BIND nameserver software.
- chkservd — cPanel’s TailWatch log processing service.
- clamd — ClamAV anti-virus software.
- courier — Courier mail server.
- cpdavd — cPanel’s WebDAV server.
- cppop — cPanel’s POP server.
- dovecot — Dovecot mail server.
- entropychat — Entropy chat client.
- exim — Exim mail exchanger.
- eximstats — Exim mail statistics tracker.
- ftpserver — FTP server.
- httpd — Apache web server.
- imap — IMAP server.
- inetd — Super-server daemon for managing Internet services.
- interchange — Interchange e-commerce software.
- ipaliases — IP aliasing software.
- melange — Melange chat client.
- mysql — MySQL database server.
- named — BIND nameserver software.
- nsd — Open-source NSD nameserver daemon.
- postgres — PostgresSQL database service.
- postgresql — PostgreSQL database service.
- proftpd — ProFTP server daemon.
- pureftpd — Pure-FTP server daemon.
- rsyslogd — Open-source log forwarder daemon.
- spamd — Spam-deferral daemon.
- sshd — Secure shell daemon.
- syslogd — Log forwarder daemon.
- tailwatchd — cPanel’s TailWatch log processing service.
- tomcat — Apache Tomcat service.
- xinetd — Open-source super-server daemon.
addpop— Adds a POP account.delpop— Removes a POP account.wwwacct— Adds a cPanel account.killpkg— Removes a package.restorepkg— Restores a package.cpbackup— Backs up all accounts.pkgacct— Handles cPanel packages.upcp— Updates cPanel and WHM.setupmailserver— Allows you to switch between mailservers.setupftpserver— Allows you to switch between FTP servers.setupnameserver— Allows switching between DNS servers.checkperlmodules— Contains a list of standard CPAN modules to install on cPanel servers. This script is used in conjunction with realperlinstaller, below. This script can be used with the following arguments:- –force will reinstall everymodule regardless of whether or not it is working.
- –full will ensure that all modules are present as opposed to only checking for essential modules.
realperlinstaller— A wrapper script that automates the installation of Perl CPAN modules.suspendacct— Suspends an account.unsuspendacct— Unsuspends an account.runweblogs— Updates statistics for a user.runstatsonce— Updates statistics for all users.makecppphp— Re-installs cPanel’s internal PHP.portsup— Updates ports (FreeBSD® systems only).
Have any questions about any of these commands, what they are or what they do, don’t hesitate to leave a comment and we’ll get back to you!
0 Responses to “WHM Scripts”