View Full Version : auto start script
linuxuser1
11th April 2006, 11:49
Hi
How to i make this to start automatically
5 * * * * /opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
Thanks.
falko
11th April 2006, 15:05
Do you want to have this as a cron job? Then run crontab -e and enter that line there.
Aiken
11th April 2006, 22:34
Hi
How to i make this to start automatically
5 * * * * /opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
Thanks.
You realise that will run at 5 past every hour?
If you mean you want it to start when the box is restarted then some versions of cron (such as Redhat) support @reboot so your crontab entry would be
@reboot /opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
falko
12th April 2006, 12:29
If you want to start it at boot time, you simply create a script like /etc/init.d/jwwim_server_sql2:
#!/bin/bash
/opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
Then run
chmod 755 /etc/init.d/jwwim_server_sql2 and create the necessary system startup links. Depending on your distribution you can do it with chkconfig (RedHat, Fedora, CentOS, Mandriva, SuSE) or update-rc.d (Debian, Ubuntu).
reddog
16th June 2006, 08:00
If you want to start it at boot time, you simply create a script like /etc/init.d/jwwim_server_sql2:
#!/bin/bash
/opt/jdk1.5.0_06/bin/java -jar /path/to/jwwim_server_sql2.jar localhost web1_db4 PASSWORD 5190 -l
Then run
chmod 755 /etc/init.d/jwwim_server_sql2 and create the necessary system startup links. Depending on your distribution you can do it with chkconfig (RedHat, Fedora, CentOS, Mandriva, SuSE) or update-rc.d (Debian, Ubuntu).
Can any program be made to run at startup? for example: a teamspeak server, and a counter strike server. As long as i use the startup commands for the respective servers, in the code?
falko
16th June 2006, 18:44
Can any program be made to run at startup? for example: a teamspeak server, and a counter strike server. As long as i use the startup commands for the respective servers, in the code?
Yes, of course. :)
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.