Slackware - ARMThis forum is for the discussion of Slackware ARM.
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.
@Exaga
I figured I'd find you here .... I note your slackdoc nginx on Slackware ARM. I have been using nginx as the server on our lan for at least 5 years if not longer and I have never figured out why I have to start nginx from /etc/rc.d/rc.local.
Is there a reason for this? I'ts been a while but it seems to me that I didn't have to run /etc/rc.d/rc.httpd from rc.local.
I have been using nginx as the server on our lan for at least 5 years if not longer and I have never figured out why I have to start nginx from /etc/rc.d/rc.local.
Is there a reason for this? I'ts been a while but it seems to me that I didn't have to run /etc/rc.d/rc.httpd from rc.local.
FYI starting httpd is done automatically if /etc/rc.d/rc.httpd exists (and it's executable), because it's called from inside /etc/rc.d/rc.M:
Code:
# Start Apache web server:
if [ -x /etc/rc.d/rc.httpd ]; then
/etc/rc.d/rc.httpd start
fi
You can add a similar if statement in /etc/rc.d/rc.M for nginx, so it'll start automatically if /etc/rc.d/rc.nginx exists and it's executable
# Start nginx web server
if [ -x /etc/rc.d/rc.nginx ] then
/etc/rc.d/rc.nginx start
fi
Perhaps I'm missing something here, The above statement in /etc/rc.d/rc.M will not start the nginx server, however, the following line in /etc/rc.d/rc.local will
Code:
# Start the nginx server
/etc/rc.d/rc.nginx start
I'll leave it at that. I've been fiddling around with trying to get something else to run at boot with either its command in rc.local or an rc script for a couple of hours with no joy yet ... nginx from rc.local is good ....
# Start nginx web server
if [ -x /etc/rc.d/rc.nginx ] then
/etc/rc.d/rc.nginx start
fi
Perhaps I'm missing something here, The above statement in /etc/rc.d/rc.M will not start the nginx server, however, the following line in /etc/rc.d/rc.local will
Code:
# Start the nginx server
/etc/rc.d/rc.nginx start
I'll leave it at that. I've been fiddling around with trying to get something else to run at boot with either its command in rc.local or an rc script for a couple of hours with no joy yet ... nginx from rc.local is good ....
You miss the semicolon after the closing square bracket, so I guess that's why it's not starting on boot from rc.M
Code:
if [ -x /etc/rc.d/rc.nginx ]; then
/etc/rc.d/rc.nginx start
fi
@Exaga
I figured I'd find you here .... I note your slackdoc nginx on Slackware ARM. I have been using nginx as the server on our lan for at least 5 years if not longer and I have never figured out why I have to start nginx from /etc/rc.d/rc.local.
Is there a reason for this? I'ts been a while but it seems to me that I didn't have to run /etc/rc.d/rc.httpd from rc.local.
Hi justwantin,
For bona fide Slackware rc.scripts just making them executable will ensure they run automatically at boot time. Although this is not the same for nginx and other 'non-Slackware' scripts. They need starting appropriately. Adding a line to /etc/rc.d/rc.local is the easiest thing to do in this instance. For times when it is better to have the script(s) started at an earlier point in the boot process you could modify one of the main [rc.M, rc.S, etc.] init scripts. A line in /etc/rc.d/rc.local for such scripts is easier to manage for me.
IIRC I also needed FastCGI to start before nginx. So that's why I put it in that specific order in the /etc/rc.d/rc.local file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.