This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /home | |
for user in `ls /var/cpanel/users` | |
do | |
test ! -d $user && continue | |
touch $user/.spamassassinenable $user/.spamassassinboxenable | |
chown $user.$user $user/.spamassassinenable $user/.spamassassinboxenable | |
echo $user complete | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
echo > restorehome.txt; | |
echo > restoremail.txt; | |
CP_ACCOUNTS=`ls -1A /var/cpanel/users/ | grep -v "root"` | |
for user in `echo -n $CP_ACCOUNTS` | |
do | |
#echo $user; | |
maindomain=`cat /etc/trueuserdomains | grep -w "$user$" | cut -d : -f1`; | |
homedir=`cat /var/cpanel/userdata/$user/$maindomain | grep homedir | cut -d / -f2`; | |
#echo "$homedir"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use lib '/root/sysutils/modules'; | |
use XML::Simple; | |
use Data::Dumper; | |
use XMLAPIRequest; | |
chomp(my $hostname = `hostname`); | |
$xmlapi = XMLAPIRequest->new( | |
'HOSTNAME' => $hostname | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Script By Aress Guys ## | |
## Verifying Parameters ## | |
if [[ "$1" == *.* || "$1" == *.*.* && $2 != "" && "$3" == "ssl" || "$3" == 'std' ]]; then | |
echo "!! Wait !!" | |
echo "" | |
sleep 1 | |
else | |
echo "Incorrect Parameters" | |
echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if grep -Fxq "ulimit -c 0" /etc/init.d/httpd | |
then | |
exit 0 | |
else | |
sed -i '/ulimit -n 16384/a ulimit -c 0' /etc/init.d/httpd | |
/etc/init.d/httpd stop | |
sleep 10 | |
/etc/init.d/httpd start | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd /var/cpanel/cluster/root/config | |
mv 69.42.58.5 173.46.7.5 | |
mv 69.42.58.5-dnsrole 173.46.7.5-dnsrole |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ionice -c3 find /home/*/fantastico_backups/ -name 'backup*' -mtime +15 -exec rm {} \; | |
ionice -c3 find /home/*/fantastico_backups/ -name '.backup*' -mtime +15 -exec rm {} \; | |
ionice -c3 find /home/*/tmp/Cpanel_Form_file.upload.* -mtime +0 -exec rm {} \; | |
ionice -c3 find /home/*/mail/*/*/.Trash/cur/* -type f -mtime +6 -exec rm {} \; | |
ionice -c3 find /home/*/mail/*/*/.Trash/new/* -type f -mtime +6 -exec rm {} \; | |
ionice -c3 find /home/*/mail/.Trash/cur/* -type f -mtime +6 -exec rm {} \; | |
ionice -c3 find /home/*/mail/.Trash/new/* -type f -mtime +6 -exec rm {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/usr/sbin/exiqgrep -i -r root@`hostname`| xargs /usr/sbin/exim -Mrm > /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/cpanel/3rdparty/perl/514/bin/perl | |
use RRDs; | |
use Getopt::Long; | |
my $server; | |
my $direction; | |
GetOptions( | |
"server=s" => \$server, | |
"direction=s" => \$direction, | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/cpanel/3rdparty/perl/514/bin/perl | |
#use strict; | |
use warnings; | |
use YAML::Tiny; | |
use Data::Dumper; | |
my $username = $ARGV[0]; | |
my @dnsservers = ("8.8.8.8","8.8.4.4"); |