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 ?
Asked
Active
Viewed 81 times
1 Answers
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
-
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 '19 at 13:26