diff --git a/apache.txt b/apache.txt deleted file mode 100644 index c466fda..0000000 --- a/apache.txt +++ /dev/null @@ -1,23 +0,0 @@ -NameVirtualHost 127.0.0.1:80 - - DocumentRoot /var/www/ - - Options FollowSymLinks - AllowOverride None - - ErrorLog /var/log/apache2/error.log - LogLevel warn - CustomLog /var/log/apache2/access.log combined - ServerSignature On - - - DocumentRoot /var/www2/ - - Options FollowSymLinks - AllowOverride None - - ErrorLog /var/log/apache2/error2.log - LogLevel warn - CustomLog /var/log/apache2/access2.log combined - ServerSignature On - diff --git a/brotips.sh b/brotips.sh new file mode 100755 index 0000000..1fecb89 --- /dev/null +++ b/brotips.sh @@ -0,0 +1,6 @@ +#!/bin/bash +while [ 1 ] +do +lynx --dump www.brotips.com/random | awk -F "brotip #" '{print $2}' | cut -d":" -f2 | awk -F '%0A%0Aht' '{print $1}' | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs -0 echo -e | awk '/./' +sleep 1m +done diff --git a/foo_out.txt b/foo_out.txt deleted file mode 100644 index 44deaf5..0000000 --- a/foo_out.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is something becasue i want something -BLah! diff --git a/kernel_check.sh b/kernel_check.sh new file mode 100755 index 0000000..09cf4d9 --- /dev/null +++ b/kernel_check.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +for i in `cat machines.txt` +do + ssh $i "uname -a" +done diff --git a/lazy.sh b/lazy.sh new file mode 100755 index 0000000..f140270 --- /dev/null +++ b/lazy.sh @@ -0,0 +1,5 @@ +#!/bin/bash +for i in `cat prod_machines.txt` ; do scp linux_audit.sh $i://tmp/ ; done +for i in `cat prod_machines.txt` ; do ssh $i /tmp/linux_audit.sh ; done +./pull_linux_audit.sh +ls -ltra *.txt diff --git a/linux_audit.sh b/linux_audit.sh new file mode 100755 index 0000000..60ce705 --- /dev/null +++ b/linux_audit.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +DATE=`date +%F` +HOSTNAME=`hostname -s` + +uname -a > out1.txt +echo "" > out2.txt +uptime > out3.txt +echo "" > out4.txt +rpm -qa | sort -u > out5.txt +echo "" > out6.txt +df -h > out7.txt +cat out* | tee $HOSTNAME.$DATE.txt +rm out*.txt +cp $HOSTNAME.$DATE.txt /tmp/ diff --git a/load_check.sh b/load_check.sh new file mode 100755 index 0000000..22dd7d9 --- /dev/null +++ b/load_check.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +for i in `cat machines.txt` +do + ssh $i uptime +done diff --git a/pull_bb_logs.sh b/pull_bb_logs.sh index 993e7c7..cdb9d88 100755 --- a/pull_bb_logs.sh +++ b/pull_bb_logs.sh @@ -1,9 +1,12 @@ #!/bin/bash USER=asgharje -DATE=`date +%F` -TOMCAT_DATE=`date +%Y%m%d` -BB_DATE=`date +%Y-%m-%d` +DATE=2012-07-01 +#DATE=`date +%F` +#TOMCAT_DATE=`date +%Y%m%d` +TOMCAT_DATE=20120701 +#BB_DATE=`date +%Y-%m-%d` +BB_DATE=2012-07-01 # # Create the directory diff --git a/pull_linux_audit.sh b/pull_linux_audit.sh new file mode 100755 index 0000000..3e7f4f5 --- /dev/null +++ b/pull_linux_audit.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for i in `cat prod_machines.txt` +do + scp $i://tmp/*.txt ./ + ssh $i rm /tmp/*.txt +done diff --git a/writelines_outfile.txt b/writelines_outfile.txt deleted file mode 100644 index 8b1acc1..0000000 --- a/writelines_outfile.txt +++ /dev/null @@ -1,10 +0,0 @@ -0 -1 -2 -3 -4 -5 -6 -7 -8 -9