Run update_daemon2.php from cron

I've written a shell script meant to be used to run update_daemon2.php on web hosts that won't give you shell access but will let you run cron jobs.
The script is built to monitor the update daemon, start it if its down and mail you (via cron). It also sends the daemon output to a log file and can manage it for you with logrotate(8).
I branched from an old version because that is what I run on my site currently, I will probably upgrade soon, but AFAIK the script should work as-is with newer versions.