How do I specify dependencies between init scripts on CentOS?
E.g. I need that when service “tomcat” is started it first start service “soffice”.
On Gentoo we can do:
depend() {
need soffice
}
But what about CentOS?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CentOS out of the box uses an integer to specify the start/stop.
If you look inside an init script you’ll most likely see:
chkconfig: - 85 15First number: start priority (higher = lower priority)
Second: Stop priority (lower = lower priority)
If you hop into
/etc/rc3.d(or depending on run level).Files start with either an
S(start) or aK(kill, stop) followed by an integer. Same concept applies in regards to numerics.In some cases you’ll see:
chkconfig: - 2345 85 15To change order, simply adjust those numbers.
This simply represents the run levels (2,3,4,5).