Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Something
Friday, December 28th, 2007 at 10:19:29pm MST 

  1. #!/bin/bash
  2.  
  3. this=$(ps aux | grep httpd | awk '{print $11}' | grep httpd | head -1)
  4. if [ "$this" = "/usr/local/apache/bin/httpd" ]; then
  5.         echo "httpd was found"
  6. else
  7.         echo "httpd was not found"
  8.         /etc/init.d/httpd restart
  9.         fi
  10.  
  11. thing=$(ps aux | grep squid | awk '{print $1}' | grep squid | head -1)
  12. if [ "$thing" = "squid" ]; then
  13.         echo "squid was found"
  14. else
  15.     echo "squid not found"
  16.     /etc/init.d/httpd stop
  17.     sleep 4
  18.     killall httpd
  19.     sleep 4
  20.     killall -KILL httpd
  21.     sleep 4
  22.     src="/home/squid/var/logs/access.log"
  23.     thing=$(echo "`date +%s`" )
  24.     stuff=$src.$thing
  25.     mv $src $stuff
  26.     rm /home/squid/var/logs/access.log
  27.     ulimit -HSn 8192
  28.     /home/squid/sbin/squid
  29.     sleep 4
  30.     /etc/init.d/httpd restart
  31.     /usr/local/spri/spri -q
  32.     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.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



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.

worth-right fantasy-obligation