0

When a service, most notably httpd is configured to run in level 3 and 5 (on CentOS 6.5) and the current run-level is 3 and I move to 5 by init 5, then init restarts httpd which is silly IMHO. Is there a way to prevent this behavior ?

0

1 Answer 1

0

This behaviour can be achieved by turning off the 'httpd' service at run-level 5.

chkconfig --level 5 httpd off

This will disable the service to start at run-level 5.

Thanks

1
  • I don't want the service disabled, i simply want to prevent it from being restarted if it was already running. In other words, it is set to run in level 3 and 5, why restart it when switching from 3 to 5 ?
    – Waslap
    Feb 22, 2019 at 13:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .