All pastes #580343 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-06-21 01:31 UTC
rendered paste body
#!/bin/bash

APACHECONF=/usr/local/apache2/conf/httpd.conf
DATE=`date --iso-8601`

echo $DATE > ~/`hostname`

echo -e "\n** ls usr local:" 2>> ~/`hostname` >> ~/`hostname`
ls /usr/local/ 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** Server name (as per customs httpd.conf):" 2>> ~/`hostname` >> ~/`hostname`
grep ServerName $APACHECONF 2>> ~/`hostname` |grep -v \# |head -n 1 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** All hostnames (as per customs httpd.conf):" 2>> ~/`hostname` >> ~/`hostname`
grep ServerName $APACHECONF 2>> ~/`hostname` |grep -v \# 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** Loaded Modules (as per custom's httpd.conf):" 2>> ~/`hostname` >> ~/`hostname`
grep LoadModule $APACHECONF 2>> ~/`hostname` |grep -v \# 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** Loadable Modules (as per customs modules dir):" 2>> ~/`hostname` >> ~/`hostname`
\ls /usr/local/apache2/modules/ 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** Statically compiled modules (cust. Apache):" 2>> ~/`hostname` >> ~/`hostname`
/usr/local/apache2/bin/apachectl -l 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** Custom apache version is:" 2>> ~/`hostname` >> ~/`hostname`
/usr/local/apache2/bin/httpd -v 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** Custom Postgres version is:" 2>> ~/`hostname` >> ~/`hostname`
/usr/local/pgsql/bin/postgres --version 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** Path Posgresql version:" 2>> ~/`hostname` >> ~/`hostname` 2>> ~/`hostname` >> ~/`hostname`
postgres --version 2>> ~/`hostname` >> ~/`hostname` 2>> ~/`hostname` >> ~/`hostname`

echo -e "\n** Custom Mysql version is:" 2>> ~/`hostname` >> ~/`hostname`
mysql --version 2>> ~/`hostname` >> ~/`hostname`

sed -i -e "s/\\t//g" ~/`hostname`
sed -i -e "s/  //g" ~/`hostname`

echo -e "\nScp this file to Redhat:Gather2/\nThen view its contents\n"
scp `hostname` kgoetz@192.168.2.7:Gather2/

echo -e "\n"
head `hostname`
tail `hostname`
echo -e "\n"

rm `hostname`
rm $0