[PLUG] POE server startups.

Paul Heinlein heinlein at madboa.com
Thu Jun 28 19:15:14 UTC 2007


On Thu, 28 Jun 2007, Roderick A. Anderson wrote:

> I have created a POE based server (a framework for creating 
> event-driven multitasking programs in Perl not PoE - Power over 
> Ethernet) and now need to have it started when the system starts and 
> kept up and running.
>
> I'm still pretty new to POE servers and have not found this 
> addressed in the docs ... so far.
>
> Anyone worked up a non-traditional service server?  Non-traditional 
> as in being written in something besides C/C++ or another compiled 
> language?
>
> I've looked at an entry in /etc/inittab, /etc/rc.d/rc.local, or 
> using a System-V type script.  Not sure of the pros and cons of each 
> of these.

Helpful information you could provide:

  1. What distribution are you using?

  2. How did you install your server software? (Manually? Package?)

For Debian or Red Hat systems (or their derivatives) dropping a script 
into /etc/init.d/ and then symlinking it into your desired runlevel(s) 
is the most flexible approach, since all start/stop operations can be 
managed from a single place. Red Hat provides the chkconfig utility 
for managing runlevel symlinks. I don't know if Debian-esque systems 
have a similar utility.

The init script can source a different file -- usually located in 
/etc/sysconfig/ for Red Hat, /etc/default/ for Debian -- for any 
custom options that need to be passed to the daemon at start time.

Gentoo is a whole different thing. You'll want specialized advice for 
runscripts.

Beyond that, the alternatives (inittab, rc.local, @reboot in crontab) 
will work, but none provides a handy interface for stops and restarts.

-- 
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/



More information about the PLUG mailing list