2

newbie question... how can I get my script init script to start when linux boots. Can I just drop a script into the /etc/init.d directory and make manual links to rcX.d?

Thanks

2
  • 1
    Depends on the distribution. You should look up how to do it for your target. Commented Jun 17, 2013 at 2:42
  • Manual links are indistinguishable from automatically created links. Commented Jun 17, 2013 at 2:42

2 Answers 2

1

The file /etc/rc.local is a good candidate for local jobs, and it avoids some of the complexity of using /etc/init.d/ and similar directories.

Just add a line to /etc/rc.local to launch your job.

Sign up to request clarification or add additional context in comments.

Comments

1

Yes, you are right. You can read on this: http://www.cyberciti.biz/tips/linux-how-to-run-a-command-when-boots-up.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.