Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hello i have a script i want to start when the server boots. i put the script on the /etc/rc.d/rc.local is this the right place? for some reason it doesn't run the script at boot.
That is usually the file to place them in but I believe it depends on what runlevel you startup in, as Redhat changes these around, could be in /etc/rc.d/init.d or so forth. I no longer use Redhat, but sometimes they will have a link to each runlevel in /etc/ named like rc.0 or rc.3 and so forth. If you boot into runlevel 3, place the script where the link /etc/rc.3 is linked to.
/etc/rc.d/rc.local is a good place. But if it's a script, it may be better to put it to /etc/rc.d/init.d/ and symplnk it to the right runlevel (for example /etc/init.d/rc3.d/S50yourservice). 'rc3.d' means it's runlevel 3 (console, multiuser, with network), 'S50' means to start the service (S), numbers are priorities.
...and if you're still wondering why it didn't work while you had in incorporated in rc.local, debugging shouldn't be hard if you make it a separate script and do "sh -x <script> (args) 2>&1|tee /tmp/script.log", then read /tmp/script.log if it did fly by to fast.
Else post the script(+log).
/etc/rc.d/rc.local is a good place. But if it's a script, it may be better to put it to /etc/rc.d/init.d/ and symplnk it to the right runlevel (for example /etc/init.d/rc3.d/S50yourservice). 'rc3.d' means it's runlevel 3 (console, multiuser, with network), 'S50' means to start the service (S), numbers are priorities.
sorry kind of a newbie,
i have the script called startup.sh , how would i add this to the /etc/initd/rc3.d/ ?
/etc/rc.d/init.d/ directory, simply copy your script inside. Then you need to create a symplnik from this file (copied). The symplink should be placed in the right directory /etc/rc?.d/
no luck, it didn't start. i had to run the script manually. is there a was to test it, without having to reboot? does anyone know how i can troubleshoot this?
somehow it got created in the /etc/rc3.d/ directory. because i have it in both the /etc/rc.d/rc3.d and in /etc/rc3.d. and i did a diff on both and there is no differences.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.