IngUnix IngUnix - 1 year ago 133
Linux Question

where i can put a script to start on init centos?

I need to put a script to start on init on centos ?, i not need to make a daemon, only a script.

i don't know if can do this, but only get answer that can be with daemon.
i don't need daemon.

i put some scrips like this to init centos:

bufferC = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, w3ingunix)
c.setopt(c.WRITEFUNCTION, bufferC.write)
# Body is a string in some encoding.
bodyC = bufferC.getvalue()

i need a script to run no matter path where it is and not need to be a daemon !

Answer Source

well!, only you have to do, is make that script and save on wherever you decide on the system and refer it on this path to get start on init on centos !

cd /etc, then

vim rc.local

and put the path of your script, the when restart system, your script will run.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download