/etc/init.d
contains all the start-up scripts for every service at every run level.Upstart
. Ubuntu still retains many of the structure of the Init
just described./etc/init.d/apache2 restart
To see how an event-driven system can improve on traditional init scripts, let’s take the previous example of a system booted with an unplugged network cable. You could create an Upstart script that is triggered when a network cable is plugged in. That script could then restart the networking service for you. You could then configure any services that require a network connection to be triggered whenever the networking service starts successfully. Now when the system boots, you could just plug in the network cable and Upstart scripts would take care of the rest. [From DevOps Troubleshooting]
sudo initctl list
sudo service servicename start
sudo service mysql start