Gentoo: Adding services to be run after a boot

Posted on 2006-04-25
Last Modified: 2013-12-16

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.
Question by:jonbutler_uk
    LVL 34

    Accepted Solution

    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.
    LVL 43

    Expert Comment

    or simply use /etc/conf.d/local.start /etc/conf.d/local.stop
    LVL 14

    Expert Comment

    > 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...



    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now