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

4

2 回答 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.

于 2013-06-17T02:42:21.820 回答
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

于 2013-06-17T02:43:26.247 回答