WHM/cPanel Scripts

fixallcartswithsuexec – Fixes permissions on carts when using suexec.
fixallinterchangeperm – Fixes permissions on all users’ Interchange Shopping Carts.
fixbinpath – Makes sure all bin file paths are correct.
fixbuggynamed – Updates bind to solve any problems with bugs.
fixcommonproblems – Attempt to fix the most common problems.
fixetchosts – Fixes problems with /etc/hosts
fixeverything – Fix common problems and quotas.
fixfpwml – Fix for .wml errors with frontpage.
fixheaders – Run if nothing compiles errors with .h files on compile.
fixinterchange – Reinstall interchange Perl modules.
fixinterchangeperm – fix permissions on a user’s interchange cart.
fixipsnm – Same as addnetmask ips, but Perl though.
fixlibnet – Reinstall Bundle::libnet (Perl).
fixlocalhostwithphp – Change /etc/hosts to work better with PHP 4.2.0 + MySQL.
fixmailman – Updates and restarts mailman.
fixmailmanwithsuexec –
fixmuse – Reinstalls muse.
fixmysql – Fixes problems with mySQL.
fixmysqlbsd – Fixes problesm with mySQL on FreeBSD.
fixnamed – Updates bind to handle many DNS zones (more than 512).
fixndc – Repair redhat’s broken named.conf on 7.2.
fixoldlistswithsuexec – Run after enabling suexec on the server to change the URLs that Mailman gives out to ones that don’t give a 500 internal server error.
fixperl – Symlink /usr/local/bin/perl /usr/bin/perl.
fixperlscript – Makes sure a perlscript includes all corresponding modules.
fixpop – Fix a POP account and reset password.
fixproftpdconf – Fixes problems with /usr/local/etc/proftpd.conf
fixproftpddupes – Updates proftpd.
fixquotas – Fix quotas.
fixrndc – Fixes named.conf to prevent rndc staus failed.
fixspamassassinfailedupdate – Reinstalls a failed spamassassin update.
fixsubdomainlogs – Run if subdomain logs don’t show up in cPanel.
fixsuexeccgiscripts – Fix CGI scripts that are broken after suexec installed.
fixvaliases – Fix permisions on valiases.
fixwebalizer – Repair a Webalizer that has stopped updating.

Common cPanel /Scripts

Install Zend Optimizer /scripts/installzendopt
Hostname A Entry Missing! /scripts/fixndc then restart bind and apache
Install Cron on New Server /scripts/installrpm anacron vixie-cron ; /etc/rc.d/init.d/crond start
Bandwidth issues /scripts/cleanbw
/scripts/fixwebalizer (To fix problem in webalizer that stop updating stats)
Fixing Mail List MailMan /usr/local/cpanel/bin/convertmailman2
Reinstall MailMan /scripts/reinstallmailman
Fix Permissions on accounts: /scripts/fixhome
Edit mySQL conf file: pico /etc/my.cnf
Edit php.ini: pico /usr/local/lib/php.ini
Edit Apache Conf: pico /etc/httpd/conf/httpd.conf
Checking Real Time Top Processes Login to SSH and run: top
Run cpanel backup /scripts/cpbackup
To try and fix domain controller: /scripts/fixndc

Quotas /scripts/initquotas – takes a while to run
/scripts/fixquotas – takes a while to run

/scripts/adddns Add a Dns Entry
/scripts/addfpmail Install Frontpage Mail Exts
/scripts/addservlets Add JavaServlets to an account (jsp plugin required)
/scripts/adduser Add a User
/scripts/admin Run WHM Lite
/scripts/apachelimits Add Rlimits (cpu and mem limits) to apache.
/scripts/dnstransfer Resync with a master DNS Server
/scripts/editquota Edit A Users Quota
/scripts/finddev Search For Trojans in /dev
/scripts/findtrojans Locate Trojan Horses
Suggest Usage
/scripts/findtrojans > /var/log/trojans
/scripts/fixtrojans /var/log/trojans
/scripts/fixcartwithsuexec Make Interchange work with suexec
/scripts/fixinterchange Fix Most Problems with Interchange
/scripts/fixtrojans Run on a trojans horse file created by findtrojans to remove them
/scripts/fixwebalizer Run this if a users stats stop working
/scripts/fixvaliases Fix a broken valias file
/scripts/hdparamify Turn on DMA and 32bit IDE hard drive access (once per boot)
/scripts/initquotas Re-scan quotas. Usually fixes Disk space display problems
/scripts/initsuexec Turn on SUEXEC (probably a bad idea)
/scripts/installzendopt Fetch + Install Zend Optimizer
/scripts/ipusage Display Ipusage Report
/scripts/killacct Terminate an Account
/scripts/killbadrpms Delete Security Problem Infested RPMS
/scripts/mailperm Fix Various Mail Permission Problems
/scripts/mailtroubleshoot Attempt to Troubleshoot a Mail Problem
/scripts/mysqlpasswd Change a Mysql Password
/scripts/quicksecure Kill Potential Security Problem Services
/scripts/rebuildippool Rebuild Ip Address Pool
/scripts/remdefssl Delete Nasty SSL entry in apache default httpd.conf
/scripts/restartsrv Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql)
/scripts/rpmup Syncup Security Updates from RedHat/Mandrake
/scripts/runlogsnow Force a webalizer/analog update.
/scripts/secureit Remove non-important suid binaries
/scripts/setupfp4 Install Frontpage 4+ on an account.
/scripts/simpleps Return a Simple process list. Useful for finding where cgi scripts are running from.
/scripts/suspendacct Suspend an account
/scripts/sysup Syncup Cpanel RPM Updates
/scripts/unblockip Unblock an IP
/scripts/unsuspendacct UnSuspend an account
/scripts/upcp Update Cpanel
/scripts/updatenow Update /scripts
/scripts/wwwacct Create a New Account

/scripts/runweblogs account username for awstats to run manually

Sometimes such behavior of apache/httpd (taking more and more memory until it dies or crashes the server) can be caused by corrupted MySQL database. Try to do the following:
1) Kill the mysql server
/etc/rc.d/init.d/mysql stop

2) Repair all SQL databases:
myisamchk -r /var/lib/mysql/*/*.MYI

3) Start mysql again:
/etc/rc.d/init.d/mysql start

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.