0

I have some trouble with starting my written C++ application each time my raspberry pi with raspbian OS boots. I found the following instructions:

http://www.stuffaboutcode.com/2012/06/raspberry-pi-run-program-at-start-up.html

So I followed all of the mentioned steps:

  1. Created my script in /etc/init.d/myScript (by copying and modifying an existing one)
  2. Entered the path to my C++-Programm:

case "$1" in
start)

echo "Starting my programm..."

/home/pi/myProgram ;;

Note: In reality this file is well formatted and I dont get a parsing error! However if I want to start my own service with

sudo service myScript start

i get the following message:

/home/pi/myProgram    no such process

Seems to me that my C++ program can not be found? What should I do?

Community
  • 1
  • 1
Anonymous
  • 4,617
  • 9
  • 48
  • 61
  • What happens when you try to run `/home/pi/myProgram` directly from the command line? – admdrew Oct 22 '13 at 18:50
  • The program starts as expected. I checked the path twice and will to this now a third time – Anonymous Oct 22 '13 at 18:52
  • The "service" command is a shell script, so here's a good way to get debug output: "sudo sh -x /usr/sbin/service myScript start" – nephtes Oct 22 '13 at 18:53

1 Answers1

1

"no such process" is almost certainly the output of the "killall" command, which would be invoked when you call "service myScript stop". I think you should double-check the init script that you copied and altered; it looks like the syntax for the case...esac got mangled.

nephtes
  • 1,319
  • 9
  • 19