Centos 6 startup script

centos, centos6, linux, startup

Solution

The simplest way would be to add your command to the file

/etc/rc.d/rc.local

Commands in the above file are run at startup (as root). Note that if you do this, your command will NOT respond to the usual service start/ stop commands.

Problem

I need to put a startup script to my CentOS6 server. I see that I need a script that contains start-stop cases. But I have a problem to make it and neither how to put this script to startup. Anyone can say me how can I add it? The script must run a simply command that run a jar file: ``` java -jar FileName.jar ```

Original source