- Something
- Friday, December 28th, 2007 at 10:19:29pm MST
- #!/bin/bash
- this=$(ps aux | grep httpd | awk '{print $11}' | grep httpd | head -1)
- if [ "$this" = "/usr/local/apache/bin/httpd" ]; then
- echo "httpd was found"
- else
- echo "httpd was not found"
- /etc/init.d/httpd restart
- fi
- thing=$(ps aux | grep squid | awk '{print $1}' | grep squid | head -1)
- if [ "$thing" = "squid" ]; then
- echo "squid was found"
- else
- echo "squid not found"
- /etc/init.d/httpd stop
- sleep 4
- killall httpd
- sleep 4
- killall -KILL httpd
- sleep 4
- src="/home/squid/var/logs/access.log"
- thing=$(echo "`date +%s`" )
- stuff=$src.$thing
- mv $src $stuff
- rm /home/squid/var/logs/access.log
- ulimit -HSn 8192
- /home/squid/sbin/squid
- sleep 4
- /etc/init.d/httpd restart
- /usr/local/spri/spri -q
- fi
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.