LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Adding a new startup process on Mandriva (https://www.linuxquestions.org/questions/linux-general-1/adding-a-new-startup-process-on-mandriva-521261/)

jcbparry 01-20-2007 05:24 PM

Adding a new startup process on Mandriva
 
I wanted to add a module that boots up and appears during the startup process. eg. Apache HTTPD Server. I have no clue how to write the code to do this. I want it to run a couple commands as root.

Thanks

btmiller 01-20-2007 05:50 PM

Assuming it's the same as Red Hat/Fedora (should be as mandrake was originally based off Red Hat IIRC) then you should look at the /etc/rc.d/init.d directory and copy one of the initialization script there and modify it for your needs. Remember to write code for the start, stop, and restart parts. You can them add ormodify the chkconfig: and description: part of the init file (see man chkconfig for a description) and use the chkconfig command to activate your service to be started at boot.

If you want a simpler way of doing it just add the commands you want to run to the /etc/rc.local file, but you won't get a "starting ..." message unless you put the command to write it out into rc.local.

jcbparry 01-20-2007 06:27 PM

Which script would you recommmend copying?


All times are GMT -5. The time now is 02:02 PM.