When I upgraded to FreeBSD 5.1 at home the other day, I found Privoxy 3.0.0 and 3.0.2 would keep crashing at home, bringing our web browsing to a stand still. So, I present my new scripting masterpeice, named privoxy_sucks.sh. It forever (or until a file is created) goes into a loop, running privoxy until it crashes. When privoxy crashes, it restarts it, and makes squid re-establish it’s connections.
To pull off the squid notification, I had to go ahead and lookup how to do timed process execution in the background, since in order for this trick to work, I needed to run privoxy in foreground mode.
#!/bin/sh while [ ! -f "/tmp/stop_privoxy" ]; do (sleep 2 && killall -HUP squid && echo "squid restarted")& su - proxy -c '/usr/local/sbin/privoxy --no-daemon' > /var/log/privoxy_output.log logger "privoxy died" echo "privoxy died" done
Blah. I hate it when I enjoy a peice of server software that’s buggy.
Add New Comment
Viewing 12 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)