What is the difference between
service apache2 restart
and
/etc/init.d/apache2 restart
So basically why is the service command recommended compared to directly invoking the appropriate command?
The service
command runs the init scripts in a predictable environment:
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /.
from: http://linux.die.net/man/8/service
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With