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 File::stat; | |
use Time::localtime; | |
for my $user (`ls /var/cpanel/users`) { | |
chomp $user; | |
if (-f "/var/cpanel/suspended/$user") { | |
$suspended = "yes"; | |
chomp($reason = `cat /var/cpanel/suspended/$user`); | |
$date = ctime(stat("/var/cpanel/suspended/$user")->mtime); |
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 | |
alias cp="cp" | |
for i in `ls /home/`; do | |
if [ -f /home/$i/public_html/hplogo.gif ]; then | |
cp -vf /root/cpanel3-skel/public_html/hplogo.gif /home/$i/public_html/hplogo.gif | |
fi | |
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 | |
for i in `tail -1000 /usr/local/apache/logs/error_log|grep "350111"| awk '{print $32}'|sort -n |uniq`;do /usr/sbin/csf -d $i wp-bruteforce;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 | |
/root/sysutils/diskusage.pl | |
/root/sysutils/bandwidthusage.pl | |
/root/sysutils/cpuparse.pl | |
/root/sysutils/mysqldbsize.pl | |
/root/sysutils/mysqlslowq.pl |
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 | |
$stats = `/root/sysutils/usagestats.sh`; | |
chomp($hostname = `hostname`); | |
chomp($date = `date +%m/%d/%Y`); | |
open (OUT, "|/usr/sbin/sendmail -t"); | |
print OUT "From: nobody\@$hostname\n"; | |
print OUT "To: sysadmin\@hostpapasupport.com\n"; | |
print OUT "Subject: $hostname: Usage Stats for $date\n\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/sh | |
/scripts/perlinstaller ExtUtils::Installer | |
rm -f /var/cpanel/version/netssleay | |
/usr/local/cpanel/bin/nativessl-install | |
/usr/local/cpanel/etc/init/stopcpsrvd | |
/usr/local/cpanel/etc/init/startcpsrvd |
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/clamav/;rm -f daily.cvd;wget http://db.local.clamav.net/daily.cvd; chown clamav: daily.cvd; |
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 | |
# | |
# Bronco May 2014 | |
# | |
CONF=/etc/exim.conf.local | |
CHANGE=0 | |
main() { | |
if [ -n "$(diff $CONF /tmp/exim.conf.local)" ] && [ -f "/tmp/exim.conf.local" ]; then | |
echo "Replacing the config..." | |
mv $CONF /home/bronco/exim.conf.local.$(date +%s) |
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 [ $# -lt 1 ]; then | |
echo "No arguments supplied" | |
echo "usage: sh setup_custom_php_ini.sh <username>" | |
exit 1 | |
fi | |
homedir=`grep $1 /etc/passwd|awk -F: '{print $6}'` |
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 | |
for rspaths in `grep path /etc/rsyncd.conf |awk '{print $3}'`; do | |
username=`echo $rspaths|awk -F/ '{print $3}'`; | |
realpath=`grep $username /etc/passwd|awk -F: '{print $6}'`; | |
#echo "DEBUG: realpath variable = $realpath"; | |
#echo "DEBUG: rspaths variable = $rspaths"; |