On Sun, Nov 21, 2010 at 8:18 PM, John R Pierce <span dir="ltr"><<a href="mailto:pierce@hogranch.com">pierce@hogranch.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">you would create a script in /etc/rc.d/init.d/   called yourjavathing, which takes the parameter {start|stop} and optionally {reload|restart|status} ...  this script would include the header lines for chkconfig.   its run by init as the root user (but without any user login profiles).   If you want your javathing to run as a different user, you should invoke your script1.sh and script2.sh via su someuser -c "/path/to/script1.sh" ...</div>
</blockquote><div><br></div><div>Thank you! This was very helpful.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
once this script exists, and you test it by invoking it as "/etc/rc.d/init.d/yourjavathing start" (and "... stop", etc), then<br>
<br>
     chkconfig --on yourjavathing<br>
<br>
will configure the OS to run it automatically at the runlevels that your chkconfig header lines specify.  and,<br>
<br>
    service yourjavathing start<br>
<br>
(or stop, etc) will manually start and stop the service.<br></blockquote><div><br></div><div>Googling, I found this example:  </div><div><br></div><div><a href="http://www.linuxjournal.com/article/4445">http://www.linuxjournal.com/article/4445</a></div>
<div><br></div><div>and I think that I can easily modify this Oracle init.d example</div><div><br></div><div><a href="http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/044/4445/4445l1.html">http://www.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/044/4445/4445l1.html</a></div>
</div><br>