Gentoo: Adding services to be run after a boot


How do I set non /etc/init.d services to be started after a boot in Gentoo linux?  I have used the rc-update command to add services which have a script in /etc/init.d such as "rc-update add mysql default" which is working fine.

I have built the following services from source but is there any way to get them started automatically?

Apache:  /usr/local/apache2/bin/apachectl start
Webmin: /usr/local/webmin/webmin-init start

Many thanks.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Duncan RoeSoftware DeveloperCommented:
You could make symbolic links in /etc/init.d to these programs e.g:
  # cd /etc/init.d
  # ln -s /usr/local/apache2/bin/apachectl .
Now you must ensure /usr/local is mounted before the scripts are obeyed - only a problem if you have it on other than the root partition.
What priority did rc-update allocate to mysql? As long as you are happy with it, you can now use it on the created symlinks.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
or simply use /etc/conf.d/local.start /etc/conf.d/local.stop
cjl7freelance for hireCommented:
> I have built the following services from source but is there any way to get them started automatically?

Why on earth do you build stuff from source when you are running Gentoo?

Both webmin and Apache are included in gentoos portage system, and any tweeking you need done can be made by editing the /etc/make.conf...


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.