Do the two different syntaxes do the same thing?
$ service apache2 restart
$ /etc/init.d/apache2 restart
|
|
Yes. The backward compatible /etc/init.d/ scripts basically run service myservice start/stop/retstart instead of doing anything themselves. |
|||
|
|
|
Service is nothing more than a shell script.
At that top you will see it sets the SERVICEDIR to /etc/init.d. The service script has a few other options such as
That loop over all services. But the name you pass to it is matched to the init.d script. |
|||
|
|
|
Yes. To be precise:
(from |
|||
|
|
|
In a way, yes. Actually upstart jobs will give a warning if started with |
|||
|
|