Archive for the ‘Scripts’ category

How to Uninstall Servlets from a cPanel Account

September 7th, 2010

You can remove Tomcat support for sites via /scripts/remservlets, which uses the following syntax:

/scripts/remservlets --domain=domain-you-want-to-remove-jsp-and-servlets.com
Share

How to Increase the Serial Number For All DNS Zones

July 29th, 2010

NDCHost has made available a nice script that will increase the serial numbers for all DNS zones:

# cd /sbin
# rm -f updateserial
# wget http://www.ndchost.com/cpanel-whm/scripts/updateserial/download.php
# chown root.root updateserial
# chmod 0750 updateserial
# /sbin/updateserial -d /var/named

To activate your changes, be sure to reload rndc:
# rndc reload

Share

Automatically Create DomainKeys Records When Creating Account

May 21st, 2010

Hopefully this will someday be an option in “Tweak Settings”, but in the meantime, you can add DomainKeys records to your customers DNS zones automatically by creating a “hook” which will be run after /scripts/wwwacct (the script behind “Create an Account” in WHM).

You’ll want to create a file called /scripts/postwwwacct, and add the following content:

my %OPTS = @ARGV;
my $user = $OPTS{’user’};
/usr/local/cpanel/bin/domain_keys_installer $user

You’re all set now — there’s nothing else that needs to be done. Note that this only creates the DomainKeys records for new accounts. If you want to create DomainKeys records for all your existing users at once, check out my other article on the topic: http://www.cpaneladmins.com/2009/12/07/install-domainkeys-and-spf-records-for-all-users/

Share

Automated Time Sync Script

March 23rd, 2010

#!/bin/sh

#invoke ntpdate to set time from system clock
if [ -x /usr/sbin/ntpdate ]; then
/usr/sbin/ntpdate -s -t 5 date.cpanel.net
/sbin/hwclock --systohc
fi

Share

Install DomainKeys and SPF Records for All Users

December 7th, 2009


cd /var/cpanel/users
for user in * ; do /usr/local/cpanel/bin/domain_keys_installer $user ; done
for user in * ; do /usr/local/cpanel/bin/spf_installer $user ; done

Share

cPanel Web Site Hosting by IntraHost