Domanda

CentOS uses the chkconfig command to add services to to the startup routine, but how do I add a service and pass parameters to that service?

To be more precise, I'm setting up the Sphinx search engine on a CentoOS 6.5 server and the documentation wants me to do this:

chkconfig searchd on

But this would fail because my config file is in a non-standard location (I'll eventually have multiple searchd daemons running for multiple websites to use). What I need to do is add this to my startup routine:

searchd --config /etc/sphinx/website1/sphinx.conf
searchd --config /etc/sphinx/website2/sphinx.conf
searchd --config /etc/sphinx/website3/sphinx.conf

Does this make sense?

Cheers.

È stato utile?

Soluzione

I'm sure there's a more proper way to do this, but I ended up just adding the above to my /etc/rc.local file.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top