linuxinstallationinitrunlevel

runlevels init.d and rc.d


I am not sure to ask it here or at serverfault, but it has to do with my script and creating an installer...

I have made a service (linux perl script) and all the configuration files and etc etc. I would like to make an installer for it so it creates folders/puts files on the right spot, etc.

Now while developing I made a script in the /etc/init.d/ folder called "reliand".

Now when I send all my files, plus the installer to another user and I would copy that file to the same dir on that machine (i know it's same CENTOS) how would I make it run at the right runlevel?

Do I need to make a link in the rd3.d folder? or is there a command to run so it will place itself in the correct runlevels.

Thanks for the explanation.


Solution

  • Use chkconfig --add and add something like:

    # chkconfig: 345 20 80
    # description: my service
    

    to your script in /etc/init.d

    Oh ... and https://serverfault.com/ is definitely a better place for this question.