开发者

runlevels init.d and rc.d

开发者 https://www.devze.com 2023-03-03 21:32 出处:网络
I am not sure to ask it here or at serverfault, but it has to do with my script and creating an installer...

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开发者_C百科 is there a command to run so it will place itself in the correct runlevels.

Thanks for the explanation.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号