DebianThis forum is for the discussion of Debian Linux.
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.
Hi, I am using Debian4 and I have apache under /home/apache/bin/apachectl
How to start the apachectl service for every time system restart, It
must be start automatically. Please tell me how to
do or how to write the script, how to configure for
run level 2,3 and 5.
Debian uses a different init system (systemV as opposed to BSD style scripts) to Slackware, you will more likely find the correct answer in the Debian forum quicker.
Hi, I am using Debian4 and I have apache under /home/apache/bin/apachectl
How to start the apachectl service for every time system restart, It
must be start automatically. Please tell me how to
do or how to write the script, how to configure for
run level 2,3 and 5.
I'd say the quickest way to achieve this is probably:
Code:
ln -s /home/apache/bin/apachectl /etc/init.d/apachectl
sysv-rc-conf --level 235 apachectl on
If you need arguments (or anything else), substitute a script for the link.
If you don't have sysv-rc-conf already installed, well, it's only an apt-get install away!
You have to write the script. The easiest approach would be to start with the /etc/init.d/apache script used in the Debian apache package: then modify it. Then you can use rcconf or similar (or make the links yourself) to get it to start and stop at the runlevels you desire.
Easier still would be to simply install the Debian apache package. Any special reason you didn't?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.