Ubuntu uses the scripts in the
/etc/init.d directory to control the startup and shutdown of various services, including the Apache web server. The main script installed for the Apache web server is
/etc/init.d/apache2, although the actual work is done by the
apache2ctl shell script included with Apache.
/etc/init.d/apache2 is a shell script and is not the same as the Apache server located in
/usr/sbin. That is,
/usr/sbin/apache2 is the program executable file (the server);
/etc/init.d/apache2 is a shell script that uses another shell script,
apache2ctl, to control the server. See Chapter 12, “Automating Tasks and Shell Scripting,” for a description of some service scripts under
/etc/init.d and how the scripts are ...