문제

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?

도움이 되었습니까?

해결책

"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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top