View Full Version : Adding a daemon/service

12-03-2006, 06:21 PM
I'm sorry for the vague title, but I'm not familiar enough with proper terminology to attempt to use it. :)

My problem is this -- I need to have a daemon (memcached) running at all times for access through PHP. It needs the arguments -d and -p <port #>. I'm guessing it needs to be set up very similarly to mysql and such, but I can't quite figure it out.

I'm also having an issue with the daemon itself. I can, of course, start it manually, but I cannot get PHP to hook up with it. I know the PHP side is fine, because I can connect to my local system (from Westhost). The port gets scanned from outside as being open, but I cannot connect from outside or in. I just can't seem to get the daemon running properly. Once again, I realize this is vague and could be highly software-specific, but I'm just curious as to whether there's something I've missed.

Thanks a million for the help!

-John DeLancey

12-04-2006, 06:23 AM
You can start and stop stuff automatically by creating S and K entries in /etc/rc.d/rc2.d The default tasks are actually symbolic links to executables in /etc/rc.d/init.d

If you want the daemon to run when a certain port is scanned, then build your own copy of xinetd (http://www.xinetd.org/)