The difference between /etc/init.d and / sbin / service

What is the difference between running daemons (e.g. tomcat) with /etc/init.d and / sbin / service? Is there any benefit from using one or the other?

Launch CentOS 5.8 (Final)

+6
source share
1 answer

/ sbin / service simply runs the corresponding script in /etc/init.d. The advantage of run / sbin / service is that it first installs a "clean" environment. On the service page:

Service

starts the initialization of the System V init script or upstart in as as much as possible a predictable environment, removing most of the environment variables and the current working directory installed in /.

+7
source

Source: https://habr.com/ru/post/972484/


All Articles