[lug] Running a PHP script as a daemon
Sean Reifschneider
jafo at tummy.com
Wed May 17 11:38:36 MDT 2006
On Wed, May 17, 2006 at 11:09:06AM -0600, Jason Vallery wrote:
>I can setup to start on system boot, and restart if for some reason PHP
>encounters a critical error and crashes (connection drop for example).
This is what /etc/inittab is for. See "man 5 inittab" for more
information. I usually wrap my long-running scripts in a shell script
like:
path/to/daemon 2>&1 | logger -t name_of_daemon.run
So that I get errors logged.
Thanks,
Sean
--
"The only thing more expensive than hiring a professional is hiring
an amateur." -- Red Adair, Oil Well Fire-Fighter
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability
More information about the LUG
mailing list