Do I *need* `exit 0` at the end of `rc.local`?

It doesn't say "always exit 0". Read it again without the line break.

Make sure that the script will "exit 0" on success or any other value on error.

  • To indicate success, exit 0.
  • To indicate error, exit any other value.

There isn't necessarily anything that will check its status, but some init systems will display "[OK]" or "[FAIL]" on screen for the user. In any case, it's good practice to make sure your scripts exit with a meaningful return code.

The default exit status, like any other script, will be the exit status of the last command run in the script.

Tags:

Debian

Startup