1

Is there a way to run a jar at startup on CentOS 6.5 but only after MySQL is running?

closed as unclear what you're asking by Anthon, Stephen Kitt, X Tian, Jenny D, cuonglm Jun 18 '15 at 12:55

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Yes there is a way. Make sure Java is installed and make a startup script that starts after MySQL. You should at least provide some more info about the version of CentOS you are running because it makes a difference how things are started. – Anthon Jun 18 '15 at 10:13
  • @Anthon Thanks for you reply. I have CentOS 6.5 , I already have Java installed, but I don't know how to write the script. – Doua Beri Jun 18 '15 at 11:10
  • Don't you know how to write the script, or don't you know how to invoke a script after MySQL is running, or both? – Anthon Jun 18 '15 at 11:31
  • don't know how to invoke the script after MySQL is running. – Doua Beri Jun 18 '15 at 12:48
1

The quick and dirty way is to add a command that starts your application at the bottom of the file /etc/rc.local. This file is executed last of the rc files during the startup process, and normally the MySQL server should be running by then.

Not the answer you're looking for? Browse other questions tagged or ask your own question.