April 22nd, 2013 |
admin |
“DomainKeys” is an anti-spam software application that uses a public key, cryptography to authenticate the sender’s domain. cPanel offers a installer script “domain_keys_installer” using which the DomainKeys can be created and added automatically for a domain. By default the DomainKeys is not added when the account is created on the server, it has to be [...]
April 16th, 2013 |
admin |
#!/bin/bash # Shell script to find all programs and scripts with setuid bit set on. # If your system ever cracked (aka hacked) then system has this kind of binary # installed; besides the normal setuuid scripts/programs # # *TIP* # User directory /home and webroots such as /www canbe mounted with # nosuid option. [...]
April 5th, 2013 |
admin |
grep xxx@xxx.com /var/log/exim_mainlog | grep “<=” | awk {’print $3′} | wc -l
March 27th, 2013 |
admin |
The first time you use the Perl module CPAN, a script is executed in order to properly configure several options (like the location of tar, gzip and unzip files, the cache size for the build directory, etc). If you want to modify these configuration options at a later time, you can do it in 2 [...]
February 24th, 2013 |
admin |
Script for cropping down the domlogs #!/bin/bash for domain in /usr/local/apache/domlogs/*; do # Find the domain having more than 100 Mb log file size if [ 3000 -lt `du $domain | awk {'print $1'} 2> /dev/null` ] then { echo $domain; echo “splitting the file into sizes of 50 Mb each…”; /usr/local/cpanel/bin/cpuwatch 7.0 split -b [...]
February 23rd, 2013 |
admin |
You must be thinking that I’m kidding. Nope I’m not. Let me explain. After installing Linux the first thing you should do is turn off all services and deny all incoming traffic till you configured the box securely. But why…? A default installation could run many nonessential services. These services can turn into security risks. [...]
February 3rd, 2013 |
admin |
Script utility to read a file line line version 2. This is simpler version of readline script, it also demonstrate how to process text data file line by line and then separate line in fields, so that you can process it according to your need. #!/bin/bash # # Shell script utility to read a file [...]
December 10th, 2012 |
admin |
I use ADSL at home via ISP modem. As soon as my eth0 comes up I would like to have my firewall script get executed and setup the iptables firewall rules for me. Earlier, I used to type the command /root/fs.dsl.start via the sudo command. However, while reading the man page of interfaces command I [...]
December 4th, 2012 |
admin |
The following shell script will dump the mysql database and will save the .sql file on a remote location using Ftp. This script will create a backup file including the current date so you can have multiple copies of the backups of the same database under one directory. Create a file called mysqlbkup.sh # vi [...]
November 23rd, 2012 |
admin |
#!/bin/bash loadavg=$(uptime | awk -F “.” ‘{ print $1 }’ | awk -F “:” ‘{ print $5 }’) if [ "$loadavg" -ge "10" ]; then pkill -9 httpd sleep 3 /scripts/restartsrv_httpd fi Incoming search terms:restart apache if load high shell script (1)restarting high load apache server (1)