I want an executable program to run on startup. For this reason, I created a shell script: /etc/init.d/server. Then I run chmod +x name_of_script and update-rc.d server defaults.

server (script):

cd /home/root/

Server_msg prints the messages from a client. Messages are received on static IP address

Note: The connection is wireless: Static IP address gets assigned to the device, by a script running also on startup, which loads the Wi-Fi driver's adapter.

The problem:

When I added script server to run on startup as well, system is unable to run both scripts.

Any ideas?

1 Answer 1


By default, if you use:

update-rc.d server defaults

then update-rc.d will make links to start your server service in runlevels 2345 and to stop in runlevels 016, all these links have sequence number 20.

If server script depends on other services, e.g networking. So when server script start while its depending services haven't started yet, it will fail.

To be sure that server script only run when all its depending services have started, you can give server script higher priority:

update-rc.d server defaults 90

or add it to /etc/rc.local.

  • Problem solved afrer running update-rc.d server defaults 90. Thank you!
    – dempap
    Apr 9, 2014 at 16:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .