Page 1 of 1

Project can't run on startup using /etc/init.d

Posted: 2025-05-17 11:42
by Zem_Val
I have a program that firstly, before everything, launches RkLunch-stop.sh, then runs RTSP stream with camera view. I tried to make it automatically run on startup via /etc/init.d/S99eyedetection script, but seems like nothing happens in result. Even RKIPC does not turn off which means the program is not even being executed by the script.
What may be a possible issue?

You can see the script in attachments.

P.S. I tried to run the same command from script in terminal directly, all went well and program was launched successfully.

Re: Project can't run on startup using /etc/init.d

Posted: 2025-05-19 8:55
by Crocodile
Hello, please add the declaration of environment variables to your script.

Code: Select all

#! /bin/sh
[ -f /etc/profile.d/RkEnv.sh ] && source /etc/profile.d/RkEnv.sh
# Your Scripts
...
Then make sure that your script has been granted executable permissions, so that it can be run directly after modification to determine the running effect.

Code: Select all

/etc/init.d/S99eyedetection start

Re: Project can't run on startup using /etc/init.d

Posted: 2025-05-19 12:31
by Zem_Val
Crocodile wrote: 2025-05-19 8:55 Hello, please add the declaration of environment variables to your script.

Code: Select all

#! /bin/sh
[ -f /etc/profile.d/RkEnv.sh ] && source /etc/profile.d/RkEnv.sh
# Your Scripts
...
Then make sure that your script has been granted executable permissions, so that it can be run directly after modification to determine the running effect.

Code: Select all

/etc/init.d/S99eyedetection start
Thank you, that worked well, issue is solved!