sysv

my system V init script don't return


This is script content, located in /etc/init.d/myserviced:

#!/lib/init/init-d-script

DAEMON="/usr/local/bin/myprogram.py"
NAME="myserviced" 
DESC="The description of my service"

When I start the service (either by calling it directly or by calling sudo service myserviced start), I can see program myprogram.py run, but it did not return to command prompt.

I guess there must be something that I misunderstood, so what is it?

The system is Debian, running on a Raspberry Pi.


Solution

  • After more works, I finally solved this issue. There are 2 major reasons: