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/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
## 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
#!/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
#! /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
#!/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/sh | |
# Directory to store log files in | |
DST=/root/logs | |
# Any logs older than this will be deleted first | |
KEEPDAYS=14 | |
# Create DST if it doesn't exist | |
if [ ! -d "$DST" ]; then |
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 | |
my $user; | |
for $user (`ls /var/cpanel/users/`) { | |
chomp($user); | |
my @userinfo = getpwnam($user); | |
my $homedir = $userinfo[7]; | |
my $uid = $userinfo[2]; |
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 | |
BFDOMS=/root/.bf-doms | |
BFIPS=/root/.bf-ips | |
FINAL=/root/.bf-blacklist | |
DATE=$(date +%d/%b/%Y) | |
echo -n "Capturing for 30s.." | |
for S in {1..30}; do | |
service httpd fullstatus | grep POST | grep login | awk '{print $1}' >> $BFDOMS | |
sleep 1 | |
echo -n "." |
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 | |
# Directory to store log files in | |
DST=/root/logs | |
# Any logs older than this will be deleted first | |
KEEPDAYS=5 | |
# Create DST if it doesn't exist | |
if [ ! -d "$DST" ]; then |