2

I'm trying to run a service when the system starts up by following this tutorial

I have a script named service.

To make it run on startup, I ran

 sudo update-rc.d service enable

and then rebooted using sudo reboot and it works.

I'm curious as to whether I need to add a respawn line or not since it is used in this article. In my case it works even I do not add that line.

Add a respawn line for this service at the bottom of the /etc/inittab file. Here's a generic example:

/etc/inittab

id:2345:respawn:/bin/sh /path/to/application/startup

My Ubuntu version : 14.04

Zanna
  • 70,465
John Joe
  • 268

1 Answers1

2

Respawn command is used to restart a process if it is not running currently in the system. If the process get stopped in the system, then respawn can be used to trigger the starting of the process.