Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Raspbian installed on my raspberry pi. I found some guides that should allow me to auto-start scripts on startup. But it is not working.

I ran update-rc.d (not sure of the right spelling) and I checked and it created various entries in /etc/rcx.d. These entries start in either with the letter K or S.

I can run the script fine manually using "sudo service myscripthere start" (or a stop/restart). "mybinary" is located in /usr/local/bin.

Any ideas on what could be wrong? thanks

This is the contents of the script.

# Provides:          myscript
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.

case "$1" in
start)   echo -n "Start services"
   /usr/local/bin/mybinary -start
stop)   echo -n "Stop services"
   /usr/local/bin/mybinary -stop
   $0 stop
   $0 start
*)   echo "Usage: $0 start|stop|restart"
        exit 1
exit 0
share|improve this question
I think your scripts are not getting called. Makesure it gets invoked from /etc/rcX.d/Syourscript, here X is the runlevel (could be 2,3,4,5 - which runlevel you want your script to be invoked), "S" stands it's active, if you use "K" yourscript won't be invoked and S should be followed by two digits. Have you done all of this? Take sample from /etc/rcX.d/ directory. See what happens. –  rakib May 8 '13 at 8:10
pi@raspberrypi /etc $ find . -name S*nzbget* ./rc2.d/S01nzbget-daemon ./rc4.d/S01nzbget-daemon ./rc5.d/S01nzbget-daemon ./rc3.d/S01nzbget-daemon –  mrjayviper May 10 '13 at 11:51
add comment

migrated from stackoverflow.com May 8 '13 at 8:18

This question came from our site for professional and enthusiast programmers.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.