Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to launch a shell script every time Debian starts. It should start an application, amongst other things.

Where can I add this information?

share|improve this question

closed as off-topic by MDMarra, Ward, mdpc, Brent Pabst, dawud Aug 13 '13 at 15:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Ward, mdpc, Brent Pabst, dawud
If this question can be reworded to fit the rules in the help center, please edit the question.

Depends on the init system you use.

Stock Debian ships with sysvinit as default. If this is your case, write a startup script using /etc/init.d/skeleton as a template.

Make sure you give it the write owner, group and permissions. You also need to use update-rc.d(8) to activate the service for future restarts.

share|improve this answer

Simple solution: put a line calling the script at the end of /etc/rc.local.

More complex solution: create a proper init script (/etc/init.d/....) and use update-rc.d as the other answer suggests.

share|improve this answer
    
Not sure why the down vote on this. Debian provides and uses /etc/rc.local. – jscott Aug 12 '13 at 0:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.